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: Thomas Lord
Subject: Re: Shift selection using interactive spec
Date: Sun, 16 Mar 2008 17:46:15 -0700
User-agent: Thunderbird 1.5.0.5 (X11/20060808)

Lennart Borgman (gmail) wrote:

I translate it to something like this in elisp code:

;;;; pre-pre
...

There's no need for a pre-pre hook or
for a test of whether the last sequence
was shifted.   You're using the "three variables"
correctly, but there are simpler ways to use them
to achieve the same effect.



;;;; post-post
;;
(if buffer-was-changed
    (setq preserved-tm nil)
  (unless preserved-tm
    (when user-wants-it
      (setq preserved-tm maybe-preserved-tm))))
(setq tm preserved-tm)




No.   "buffer-was-changed" has nothing to do with
anything here.  Sorry.   Nor is there any need
for a "post-post" hook.   The command loop can
simply, unconditionally, copy tentative-mark to
maybe-preserved-... before running a command,
and preserved-... to tentative-mark before returning
control to the user -- two unconditional "setq"s in
the loop.   None of this "buffer-was-changed" stuff.
Those distinctions happen elsewhere in this scheme,
and on a different basis.

-t



-t





reply via email to

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