all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Possible bugs in (get last-command...) and (get this-command...)
@ 2006-09-05 16:36 Drew Adams
  2006-09-05 23:01 ` Kim F. Storm
  2006-09-06 19:05 ` Richard Stallman
  0 siblings, 2 replies; 9+ messages in thread
From: Drew Adams @ 2006-09-05 16:36 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-09-08 11:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-05 16:36 Possible bugs in (get last-command...) and (get this-command...) Drew Adams
2006-09-05 23:01 ` Kim F. Storm
2006-09-06 19:05 ` Richard Stallman
2006-09-06 19:13   ` Drew Adams
2006-09-06 22:16     ` Drew Adams
2006-09-07  9:17       ` Kim F. Storm
2006-09-08 11:55         ` Richard Stallman
2006-09-07 21:14       ` Richard Stallman
2006-09-07 21:26         ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.