diff options
author | Kenichi Handa <handa@gnu.org> | 2012-11-18 20:29:54 +0900 |
---|---|---|
committer | Kenichi Handa <handa@gnu.org> | 2012-11-18 20:29:54 +0900 |
commit | e1d276cbf9e18f13101328f56bed1a1c0a66e63a (patch) | |
tree | f1fdfc9550866b9e323da072ff2eb38821996246 /lisp/emacs-lisp/advice.el | |
parent | 00dc3ead070e2e8017629f4d60d8366ac00c32cb (diff) | |
parent | dfa8939b2827d23e02f3d7f6622e3a619ec6fd90 (diff) | |
download | emacs-e1d276cbf9e18f13101328f56bed1a1c0a66e63a.tar.gz emacs-e1d276cbf9e18f13101328f56bed1a1c0a66e63a.tar.bz2 emacs-e1d276cbf9e18f13101328f56bed1a1c0a66e63a.zip |
merge trunk
Diffstat (limited to 'lisp/emacs-lisp/advice.el')
-rw-r--r-- | lisp/emacs-lisp/advice.el | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index f9b4491e6e0..c2ebb3bbdc6 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -2239,16 +2239,15 @@ definition (see the code for `documentation')." (defun ad-definition-type (definition) "Return symbol that describes the type of DEFINITION." + ;; These symbols are only ever used to check a cache entry's validity. + ;; The suffix `2' reflects the fact that we're using version 2 of advice + ;; representations, so cache entries preactivated with version + ;; 1 can't be used. (cond - ((ad-macro-p definition) 'macro) - ((ad-subr-p definition) - (if (special-form-p definition) - 'special-form - 'subr)) - ((or (ad-lambda-p definition) - (ad-compiled-p definition)) - 'function) - ((ad-advice-p definition) 'advice))) + ((ad-macro-p definition) 'macro2) + ((ad-subr-p definition) 'subr2) + ((or (ad-lambda-p definition) (ad-compiled-p definition)) 'fun2) + ((ad-advice-p definition) 'advice2))) ;; FIXME: Can this ever happen? (defun ad-has-proper-definition (function) "True if FUNCTION is a symbol with a proper definition. @@ -2597,7 +2596,9 @@ in any of these classes." (ad-has-redefining-advice function)) (let* ((origdef (ad-real-orig-definition function)) ;; Construct the individual pieces that we need for assembly: - (orig-arglist (ad-arglist origdef)) + (orig-arglist (let ((args (ad-arglist origdef))) + ;; The arglist may still be unknown. + (if (listp args) args '(&rest args)))) (advised-arglist (or (ad-advised-arglist function) orig-arglist)) (interactive-form (ad-advised-interactive-form function)) |