From 745dc723d967d3a880b2a560e4b87b58c94e89cc Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 16 Oct 2007 02:37:33 +0000 Subject: (ad-get-advice-info): Change to a function. (ad-get-advice-info-macro): New macro, like old ad-get-advice-info. (ad-is-advised, ad-get-advice-info-field) (ad-set-advice-info-field): Use ad-get-advice-info-macro. --- lisp/emacs-lisp/advice.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index cabd0dd391e..4a5c9149a43 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -2013,7 +2013,10 @@ On each iteration VAR will be bound to the name of an advised function (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 @@ On each iteration VAR will be bound to the name of an advised function (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 @@ Assumes that FUNCTION has not yet been advised." (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: -- cgit v1.2.3 From 77f698ef0912f19c2baa68423dae7bfe4719b123 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 17 Oct 2007 23:49:26 +0000 Subject: Don't require loadhist. --- lisp/ChangeLog | 2 ++ lisp/emacs-lisp/find-func.el | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9e7dd58d79d..d6132f665aa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2007-10-17 Juanma Barranquero + * emacs-lisp/find-func.el: Don't require loadhist. + * loadhist.el (feature-symbols, file-provides, file-requires) (file-set-intersect, file-dependents): Simplify. (unload-feature-special-hooks): Update list of special hooks. diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 6a259ffd4f7..20b91b10547 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -46,8 +46,6 @@ ;;; Code: -(require 'loadhist) - ;;; User variables: (defgroup find-function nil -- cgit v1.2.3