emacs-pretest-bug
[Top][All Lists]
Advanced

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

commandp


From: Katsumi Yamaoka
Subject: commandp
Date: Thu, 26 Jul 2007 17:07:41 +0900
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

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,




reply via email to

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