emacs-devel
[Top][All Lists]
Advanced

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

Re: Shift selection using interactive spec


From: Chong Yidong
Subject: Re: Shift selection using interactive spec
Date: Sat, 15 Mar 2008 13:11:09 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> I think it would be more elegant to split this up into two pieces: a
>> variable this-single-command-shift-translated that says whether shift
>> translation occurred, and a function shift-translation-handler that
>> temporarily sets transient mark mode.  Both would be available to
>> elisp programs.
>
> Yes, that part is fine.
>
>> The new interactive spec code ^ would then call
>> shift-translation-handler if this-single-command-shift-translated is
>> non-nil, but elisp programs could accomplish this just as easily via
>> (if this-single-command-shift-translated ...).
>
> No, the `if' test should be done inside the function.

What is the rationale for this?  It seems clear that

  "Extend the temporary region highlighting for the next command"

is a neater and more self-contained task for a function than

  "Extend the temporary region highlighting for the next command, but
   only if this-single-command-shift-translated is non-nil; otherwise,
   do nothing"

If it makes you happy, we could obviously provide both functions.
Shrug.




reply via email to

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