]> git.eshelyaron.com Git - emacs.git/commitdiff
(ad-interactive-form): Re-introduce.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 28 Jul 2007 19:57:23 +0000 (19:57 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 28 Jul 2007 19:57:23 +0000 (19:57 +0000)
(ad-body-forms, ad-advised-interactive-form): Revert this part of last change.

lisp/ChangeLog
lisp/emacs-lisp/advice.el

index a9dc3eed6aa8514a722d71eb559490974fd99405..eb4f2448c0eac1181cb2d68ac4b12889244fa279 100644 (file)
@@ -1,18 +1,23 @@
+2007-07-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/advice.el (ad-interactive-form): Re-introduce.
+       (ad-body-forms, ad-advised-interactive-form): Revert this part of
+       last change.
+
 2007-07-28  Masatake YAMATO  <jet@gyve.org>
 
-       * vc.el (vc-dired-mode): Added a menu for VC related
-       operation. Use backend name as the menu label Suggested by
-       David Kastrup.
+       * vc.el (vc-dired-mode): Add a menu for VC related operation.
+       Use backend name as the menu label Suggested by David Kastrup.
 
 2007-07-28  Alan Mackenzie  <acm@muc.de>
 
        Fix problem with modes derived from CC Mode:
-       * progmodes/cc-mode.el (c-make-emacs-variables-local): move this
+       * progmodes/cc-mode.el (c-make-emacs-variables-local): Move this
        macro to cc-langs.
-       (c-init-language-vars-for): remove call to above macro.
-       * progmodes/cc-langs.el (c-make-emacs-variables-local): macro has
+       (c-init-language-vars-for): Remove call to above macro.
+       * progmodes/cc-langs.el (c-make-emacs-variables-local): Macro has
        been moved to here.
-       (c-make-init-lang-vars-fun): call c-make-emacs-variables-local.
+       (c-make-init-lang-vars-fun): Call c-make-emacs-variables-local.
 
 2007-07-28  Eli Zaretskii  <eliz@gnu.org>
 
index c6e80453d7250d83559c925aaffe982565592fb8..dbebf3147980e65d873343ac2da8953887d308d6 100644 (file)
@@ -2586,13 +2586,21 @@ that property, or otherwise use `(&rest ad-subr-args)'."
            (natnump docstring))
        docstring)))
 
+(defun ad-interactive-form (definition)
+  "Return the interactive form of DEFINITION.
+Like `interactive-form', but also works on pieces of advice."
+  (interactive-form
+   (if (ad-advice-p definition)
+       (ad-lambda-expression definition)
+     definition)))
+
 (defun ad-body-forms (definition)
   "Return the list of body forms of DEFINITION."
   (cond ((ad-compiled-p definition)
         nil)
        ((consp definition)
         (nthcdr (+ (if (ad-docstring definition) 1 0)
-                   (if (interactive-form definition) 1 0))
+                   (if (ad-interactive-form definition) 1 0))
                 (cdr (cdr (ad-lambda-expression definition)))))))
 
 ;; Matches the docstring of an advised definition.
@@ -3024,7 +3032,7 @@ in any of these classes."
                             (ad-get-enabled-advices function 'around)
                             (ad-get-enabled-advices function 'after)))
     (let ((interactive-form
-          (interactive-form (ad-advice-definition advice))))
+          (ad-interactive-form (ad-advice-definition advice))))
       (if interactive-form
          ;; We found the first one, use it:
          (ad-do-return interactive-form)))))