unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: Possible bugs in (get last-command...) and (get this-command...)
Date: Tue, 5 Sep 2006 09:36:01 -0700	[thread overview]
Message-ID: <MEEKKIABFKKDFJMPIOEBIELODEAA.drew.adams@oracle.com> (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.

             reply	other threads:[~2006-09-05 16:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-05 16:36 Drew Adams [this message]
2006-09-05 23:01 ` Possible bugs in (get last-command...) and (get this-command...) 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MEEKKIABFKKDFJMPIOEBIELODEAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).