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: Lennart Borgman (gmail)
Subject: Re: Shift selection using interactive spec
Date: Mon, 17 Mar 2008 01:21:37 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Thomas Lord wrote:
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.

Yes, I use pre-pre just as a name for a position in the command loop. It could be a hook, but need of course not be implemented that way.

Sorry for writing the code a bit un-lispish ;-)

;;;; 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.

Thanks for the clarification.

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]