emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: pre-command-hook not run for DEL


From: Kim F. Storm
Subject: Re: pre-command-hook not run for DEL
Date: Mon, 26 Feb 2007 23:27:24 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> !      (progn
>> !        ;; Since notionally this is a separate command,
>> !        ;; run all the hooks that would be run if it were
>> !        ;; executed separately.
>> !        (run-hooks 'post-command-hook)
>> !        (setq last-command this-command)
>> !        (setq this-original-command 'delete-region)
>> !        (setq this-command (or (command-remapping this-original-command)
>> !                               this-original-command))
>> !        (run-hooks 'pre-command-hook)
>> !        (call-interactively this-command))
>
> Can you say "yuck"?

It is not pretty, but what's the alternative (at this stage)?

>
> BTW, please put this out-of-line (i.e. in its own function).  The code is
> sufficiently messy and unreadable as is.

We could add a fourth optional arg, NEW-P, to call-interactively which
causes it to execute the given command as a separate command, i.e. by
executing the code above.

But I would rather like to re-implement the whole command loop in Lisp
after the release.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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