diff options
| author | Stefan Monnier | 2014-05-23 12:17:14 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-05-23 12:17:14 -0400 |
| commit | 15ad4013c44d19125fde6bbb704797d4a7a185b3 (patch) | |
| tree | e2965e142434a99d9080d111b75727b65319386c /test | |
| parent | 982ccf03983af38862a7f75841b9773b89c27773 (diff) | |
| download | emacs-15ad4013c44d19125fde6bbb704797d4a7a185b3.tar.gz emacs-15ad4013c44d19125fde6bbb704797d4a7a185b3.zip | |
* lisp/emacs-lisp/nadvice.el (advice--member-p): Change second arg.
(advice-function-member-p): Tell it to check both names and functions.
(advice--add-function): Adjust call accordingly.
Fixes: debbugs:17531
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/advice-tests.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/automated/advice-tests.el b/test/automated/advice-tests.el index e0c3b40487e..a87d979f919 100644 --- a/test/automated/advice-tests.el +++ b/test/automated/advice-tests.el | |||
| @@ -184,6 +184,7 @@ function being an around advice." | |||
| 184 | (sm-advice (lambda (x) (if (consp x) (list (* 5 (car x))) (* 4 x))))) | 184 | (sm-advice (lambda (x) (if (consp x) (list (* 5 (car x))) (* 4 x))))) |
| 185 | (should (equal (funcall sm-test10 5) 15)) | 185 | (should (equal (funcall sm-test10 5) 15)) |
| 186 | (add-function :filter-args (var sm-test10) sm-advice) | 186 | (add-function :filter-args (var sm-test10) sm-advice) |
| 187 | (should (advice-function-member-p sm-advice sm-test10)) | ||
| 187 | (should (equal (funcall sm-test10 5) 35)) | 188 | (should (equal (funcall sm-test10 5) 35)) |
| 188 | (add-function :filter-return (var sm-test10) sm-advice) | 189 | (add-function :filter-return (var sm-test10) sm-advice) |
| 189 | (should (equal (funcall sm-test10 5) 60)) | 190 | (should (equal (funcall sm-test10 5) 60)) |