diff options
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/advice.el | 4 | ||||
| -rw-r--r-- | test/automated/advice-tests.el | 7 |
3 files changed, 12 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7674881dd7b..41252ee85a9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2012-11-16 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2012-11-16 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * emacs-lisp/advice.el (ad-make-advised-definition): Improve last fix. | ||
| 4 | |||
| 3 | * emacs-lisp/cl-lib.el: Set more meaningful version number. | 5 | * emacs-lisp/cl-lib.el: Set more meaningful version number. |
| 4 | 6 | ||
| 5 | 2012-11-16 Martin Rudalics <rudalics@gmx.at> | 7 | 2012-11-16 Martin Rudalics <rudalics@gmx.at> |
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 60c1a846a79..c2ebb3bbdc6 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el | |||
| @@ -2596,7 +2596,9 @@ in any of these classes." | |||
| 2596 | (ad-has-redefining-advice function)) | 2596 | (ad-has-redefining-advice function)) |
| 2597 | (let* ((origdef (ad-real-orig-definition function)) | 2597 | (let* ((origdef (ad-real-orig-definition function)) |
| 2598 | ;; Construct the individual pieces that we need for assembly: | 2598 | ;; Construct the individual pieces that we need for assembly: |
| 2599 | (orig-arglist (and origdef (ad-arglist origdef))) | 2599 | (orig-arglist (let ((args (ad-arglist origdef))) |
| 2600 | ;; The arglist may still be unknown. | ||
| 2601 | (if (listp args) args '(&rest args)))) | ||
| 2600 | (advised-arglist (or (ad-advised-arglist function) | 2602 | (advised-arglist (or (ad-advised-arglist function) |
| 2601 | orig-arglist)) | 2603 | orig-arglist)) |
| 2602 | (interactive-form (ad-advised-interactive-form function)) | 2604 | (interactive-form (ad-advised-interactive-form function)) |
diff --git a/test/automated/advice-tests.el b/test/automated/advice-tests.el index 8f9bf54114c..80321f8f3f9 100644 --- a/test/automated/advice-tests.el +++ b/test/automated/advice-tests.el | |||
| @@ -80,6 +80,13 @@ | |||
| 80 | (sm-test5 6) 100.1) | 80 | (sm-test5 6) 100.1) |
| 81 | ((advice-remove 'sm-test5 (lambda (f y) (* (funcall f y) 5))) | 81 | ((advice-remove 'sm-test5 (lambda (f y) (* (funcall f y) 5))) |
| 82 | (sm-test5 6) 20.1) | 82 | (sm-test5 6) 20.1) |
| 83 | |||
| 84 | ;; This used to signal an error (bug#12858). | ||
| 85 | ((autoload 'sm-test6 "foo") | ||
| 86 | (defadvice sm-test6 (around test activate) | ||
| 87 | ad-do-it) | ||
| 88 | t t) | ||
| 89 | |||
| 83 | )) | 90 | )) |
| 84 | 91 | ||
| 85 | (ert-deftest advice-tests () | 92 | (ert-deftest advice-tests () |