emacs-devel
[Top][All Lists]
Advanced

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

Possible bugs in (get last-command...) and (get this-command...)


From: Drew Adams
Subject: Possible bugs in (get last-command...) and (get this-command...)
Date: Tue, 5 Sep 2006 09:36:01 -0700

I ran into this in my own code, and grepping shows that some of the vanilla
Emacs Lisp code makes the same assumption, so there might be potential bugs
there as well (I don't know).

The problem is that `last-command' and `this-command' need not necessarily
be named functions; they could be anonymous (lambdas). Some of the Emacs
Lisp code correctly tests for that like this:

(and (symbolp last-command) (get last-command...))

But some of the code does not. Perhaps someone knowledgeable might want to
take a look. I noticed, for instance that novice.el and ido.el both have
some unprotected occurrences of (get last-command...) or (get
this-command...). Again, I don't know if the `symbolp' test is necessary in
those particular contexts (perhaps it is known that a symbol is present),
but I think it might be.





reply via email to

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