emacs-devel
[Top][All Lists]
Advanced

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

Re: recenter-top-bottom


From: Richard Stallman
Subject: Re: recenter-top-bottom
Date: Sun, 11 Nov 2007 18:54:47 -0500

    >   (cond ((and (eq this-command last-command) (not arg))
    >          (setq this-command 'recenter-top-bottom-1)   <===============

    PLEASE DON'T DO THIS!!!!  This is an abuse of `\(this\|last\)-command',
    and will surely cause some other emacs function, present or future, to
    fail.

Changing the value of these variables is the recommended way to do
this sort of thing.  This is what they were made for.

      In particular, the contents of these variables have always been
    executable commands.

They have been, but I am not sure it matters -- does anything want to
funcall them?  They are normally used for eq comparisons like these,
and the different facilities that use them don't interfere because they
check for different symbols.

The one thing to check is that the feature now being designed to
record the commands and their arguments works in a way that is not
broken by functions such as kill-region, which set this-command.





reply via email to

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