From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: bug-gnu-emacs@gnu.org
Subject: Enhancement request for fill-region
Date: Tue, 28 Jan 2003 20:22:20 -0600 (CST) [thread overview]
Message-ID: <200301290222.UAA05206@eel.dms.auburn.edu> (raw)
Dale Worley wrote:
It would be convenient if when fill-region was done, it would
leave the point where it originally was. Currently, it moves the
point to the bottom of the region, where the mark is, making it
impossible to immediately use any other "<verb>-region" commands.
By comparison, most <verb>-region commands (e.g., indent-region)
leave the point and mark where they are, so they can be used in
succession.
I agree that this is inconvenient. You can not even use the usual way
(C-x C-x) to restore the original region. Just fixing this would be
completely trivial: just enclose the fill-region body in a
save-excursion form and everything is done.
There are two problems with just applying this trivial fix, however.
The first one is that there probably is some good reason for the
behavior, even though I must admit I personally can not think of any.
Indeed, from looking at the code I get the impression that the
behavior is deliberate and not the result of inadvertently forgetting
a save-excursion form. There is an explicit:
(goto-char end)
Secondly, even if there is no good reason for the behavior, plenty of
existing code might rely it and might become broken by changing it.
There might be the possibility of giving a sixth argument
`keep-point', or similar, to fill-region and put it interactively to
t, meaning that interactively you would get the behavior you want and
a programmer could pick the behavior (s)he wants. This in case that
the motivation for the behavior (whatever it is) applies only to its
non-interactive use.
Sincerely,
Luc Teirlinck.
next reply other threads:[~2003-01-29 2:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-29 2:22 Luc Teirlinck [this message]
2003-01-29 3:44 ` Enhancement request for fill-region Dale R Worley
-- strict thread matches above, loose matches on Subject: below --
2003-01-29 4:24 Luc Teirlinck
2003-01-27 16:35 Dale R Worley
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=200301290222.UAA05206@eel.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
--cc=bug-gnu-emacs@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.