From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: Possible bugs in (get last-command...) and (get this-command...) Date: Tue, 5 Sep 2006 09:36:01 -0700 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1157474210 2064 80.91.229.2 (5 Sep 2006 16:36:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 5 Sep 2006 16:36:50 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 05 18:36:49 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GKduV-0005VM-FJ for ged-emacs-devel@m.gmane.org; Tue, 05 Sep 2006 18:36:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GKduV-00044S-2Z for ged-emacs-devel@m.gmane.org; Tue, 05 Sep 2006 12:36:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GKduK-00043t-Km for emacs-devel@gnu.org; Tue, 05 Sep 2006 12:36:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GKduJ-00043M-2s for emacs-devel@gnu.org; Tue, 05 Sep 2006 12:36:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GKduI-00043J-TX for emacs-devel@gnu.org; Tue, 05 Sep 2006 12:36:14 -0400 Original-Received: from [148.87.113.118] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1GKe55-0007UV-76 for emacs-devel@gnu.org; Tue, 05 Sep 2006 12:47:23 -0400 Original-Received: from rgmsgw02.us.oracle.com (rgmsgw02.us.oracle.com [138.1.186.52]) by rgminet01.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id k85GaC3F010784 for ; Tue, 5 Sep 2006 10:36:12 -0600 Original-Received: from dradamslap (dhcp-amer-csvpn-gw2-141-144-74-150.vpn.oracle.com [141.144.74.150]) by rgmsgw02.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id k85GaBd5011983 for ; Tue, 5 Sep 2006 10:36:12 -0600 Original-To: "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:59381 Archived-At: 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.