[Top][All Lists]

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

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/advice.el,v

From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/advice.el,v
Date: Tue, 16 Oct 2007 02:37:29 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Richard M. Stallman <rms>       07/10/16 02:37:29

Index: advice.el
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/advice.el,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- advice.el   14 Oct 2007 22:46:38 -0000      1.56
+++ advice.el   16 Oct 2007 02:37:29 -0000      1.57
@@ -2013,7 +2013,10 @@
 (if (not (get 'ad-do-advised-functions 'lisp-indent-hook))
     (put 'ad-do-advised-functions 'lisp-indent-hook 1))
-(defmacro ad-get-advice-info (function)
+(defun ad-get-advice-info (function)
+  (get function 'ad-advice-info))
+(defmacro ad-get-advice-info-macro (function)
   `(get ,function 'ad-advice-info))
 (defmacro ad-set-advice-info (function advice-info)
@@ -2025,7 +2028,7 @@
 (defmacro ad-is-advised (function)
   "Return non-nil if FUNCTION has any advice info associated with it.
 This does not mean that the advice is also active."
-  (list 'ad-get-advice-info function))
+  (list 'ad-get-advice-info-macro function))
 (defun ad-initialize-advice-info (function)
   "Initialize the advice info for FUNCTION.
@@ -2035,16 +2038,16 @@
 (defmacro ad-get-advice-info-field (function field)
   "Retrieve the value of the advice info FIELD of FUNCTION."
-  `(cdr (assq ,field (ad-get-advice-info ,function))))
+  `(cdr (assq ,field (ad-get-advice-info-macro ,function))))
 (defun ad-set-advice-info-field (function field value)
   "Destructively modify VALUE of the advice info FIELD of FUNCTION."
   (and (ad-is-advised function)
-       (cond ((assq field (ad-get-advice-info function))
+       (cond ((assq field (ad-get-advice-info-macro function))
              ;; A field with that name is already present:
-              (rplacd (assq field (ad-get-advice-info function)) value))
+              (rplacd (assq field (ad-get-advice-info-macro function)) value))
             (t;; otherwise, create a new field with that name:
-             (nconc (ad-get-advice-info function)
+             (nconc (ad-get-advice-info-macro function)
                     (list (cons field value)))))))
 ;; Don't make this a macro so we can use it as a predicate:

reply via email to

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