all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Wiegley <jwiegley@gmail.com>
To: 25374@debbugs.gnu.org
Subject: bug#25374: 25.1.91; bug
Date: Sun, 28 Aug 2011 00:51:56 +0800 (5 years, 18 weeks, 6 days ago)	[thread overview]
Message-ID: <m2pok0slbb.fsf@newartisans.com> (raw)

From: Le Wang <l26wang@gmail.com>

It doesn't look right to me that auto region selection is not
accessible interactively.  The interactive "r" form is quite broken,
so you may want to fix it in other interactive forms as well.  Unless
there is a good reason you left it this way?

diff -u -b -B c\:/emacs/emacs-23.3/lisp/align.el
c\:/Users/Le/cygwin_home/tmp/align_region_patch.el
--- c:/emacs/emacs-23.3/lisp/align.el	2011-01-08 12:45:14.000000000 +0800
+++ c:/Users/Le/cygwin_home/tmp/align_region_patch.el	2011-08-28
00:39:51.336490900 +0800
@@ -857,11 +857,11 @@
 ;;;###autoload
 (defun align (beg end &optional separate rules exclude-rules)
   "Attempt to align a region based on a set of alignment rules.
-BEG and END mark the region.  If BEG and END are specifically set to
-nil (this can only be done programmatically), the beginning and end of
-the current alignment section will be calculated based on the location
-of point, and the value of `align-region-separate' (or possibly each
-rule's `separate' attribute).
+BEG and END mark the region.  If no region is active, the
+beginning and end of the current alignment section will be
+calculated based on the location of point, and the value of
+`align-region-separate' (or possibly each rule's `separate'
+attribute).

 If SEPARATE is non-nil, it overrides the value of
 `align-region-separate' for all rules, except those that have their
@@ -871,7 +871,9 @@
 default rule lists defined in `align-rules-list' and
 `align-exclude-rules-list'.  See `align-rules-list' for more details
 on the format of these lists."
-  (interactive "r")
+  (interactive (if (use-region-p)
+                   (list (region-beginning) (region-end))
+                 (list nil nil)))
   (let ((separator
 	 (or separate
 	     (if (and (symbolp align-region-separate)
-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2





             reply	other threads:[~2011-08-27 16:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-27 16:51 John Wiegley [this message]
2017-01-06  8:02 ` bug#25374: 25.1.91; bug Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2pok0slbb.fsf@newartisans.com \
    --to=jwiegley@gmail.com \
    --cc=25374@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.