emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fill-paragraph-or-region


From: Juri Linkov
Subject: Re: fill-paragraph-or-region
Date: Fri, 19 Oct 2007 03:34:07 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

> I see that fill-paragraph-or-region was removed, and instead fill-paragraph
> was changed to fill a region if transient-mark-mode is active.
>
> What was the reason for this change?
>
> It seems like a bad idea to me: fill-paragraph is already complex enough:
> what's the benefit of conflating the two?

As I understood, Richard wants the same solution to be applied to all
commands that modify their behavior when the region is active.

First, a new condition for checking the active region was added to
indent-for-tab-command.  A similar change was made later in ispell-word.
ispell-word is more complex than fill-paragraph, but still a new condition
fits nicely to the logic of this command.

It would be good to decide now what is the preferable way of doing this
and to apply the same solution consistently everywhere.

As I see, there are two possible solutions:

1. modifying the existing command by adding a condition for the
active region;

2. creating a new command with the old key binding:
fill-paragraph-or-region with M-q, ispell-word-or-region with M-$,
indent-for-tab-command-or-region with TAB.  This command decides what
a pair of existing functions to call depending on the active region.

I personally don't have an opinion which one is better.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]