From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: commandp Date: Fri, 27 Jul 2007 01:04:59 -0400 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1185512757 7421 80.91.229.12 (27 Jul 2007 05:05:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 Jul 2007 05:05:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Katsumi Yamaoka Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 27 07:05:54 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IEI1A-000490-QW for ged-emacs-devel@m.gmane.org; Fri, 27 Jul 2007 07:05:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IEI1A-00076C-DE for ged-emacs-devel@m.gmane.org; Fri, 27 Jul 2007 01:05:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IEHyo-0006Qs-K4 for emacs-devel@gnu.org; Fri, 27 Jul 2007 01:03:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IEHyn-0006QJ-0O for emacs-devel@gnu.org; Fri, 27 Jul 2007 01:03:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IEHym-0006QC-Ql for emacs-devel@gnu.org; Fri, 27 Jul 2007 01:03:08 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IEHym-0004GW-Bu for emacs-devel@gnu.org; Fri, 27 Jul 2007 01:03:08 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IEI0Z-0006RQ-58; Fri, 27 Jul 2007 01:04:59 -0400 In-reply-to: (message from Katsumi Yamaoka on Thu, 26 Jul 2007 17:07:41 +0900) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:75617 Archived-At: In the latest Emacs trunk the built-in function `commandp' returns t or nil while it returned an interactive form or nil formerly. Because of this, `defadvice' makes interactive Lisp functions non- interactive. I don't think that is entirely accurate. In Emacs 21.4. (commandp 'forward-char) and (commandp 'next-line) both return t, and they still do. I think, rather, that its return value may be t or the interactive spec, in all Emacs versions. This is not a bug, since the documentation says only that the value for a command is non-nil. It seems a change occurred in its behavior recently, and this caused a bug in advice. We need to fix this bug somehow. Making commandp return the interactive spec for noncompiled functions written in Lisp is one way. But it might be cleaner to make advice.el call `interactive-form' instead. Does that work? Would someone please DTRT, then ack? Date: Thu, 26 Jul 2007 17:07:41 +0900 From: Katsumi Yamaoka To: emacs-pretest-bug@gnu.org Organization: Emacsen advocacy group MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: commandp Hi, In the latest Emacs trunk the built-in function `commandp' returns t or nil while it returned an interactive form or nil formerly. Because of this, `defadvice' makes interactive Lisp functions non- interactive. See the `ad-interactive-form' function. Here is an example of what it causes: (defun foo () (interactive) (message "Hello")) => foo (commandp 'foo) => t (let ((ad-default-compilation-action 'never)) (defadvice foo (around testing activate) "testing" (message "Good-bye"))) => foo (commandp 'foo) => nil (pp (symbol-function 'foo)) => (lambda nil "$ad-doc: foo$" t (let (ad-return-value) (message "Good-bye") ad-return-value)) Regards, _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug