diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-09-19 22:33:34 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-09-24 09:57:17 +0200 |
commit | db354ffd578a46d898cac161ea1de1b42f96d2a0 (patch) | |
tree | 2fb34c0a511c9bef424d9f468387db89ac212561 /lisp/emacs-lisp/advice.el | |
parent | 3ec1b932c9c57d200c3a3f2fb9a0c59c4acc8011 (diff) | |
download | emacs-db354ffd578a46d898cac161ea1de1b42f96d2a0.tar.gz emacs-db354ffd578a46d898cac161ea1de1b42f96d2a0.tar.bz2 emacs-db354ffd578a46d898cac161ea1de1b42f96d2a0.zip |
Call `comp--subr-safe-advice' from the advice machinery
* lisp/emacs-lisp/nadvice.el (advice--add-function): Call
`comp--subr-safe-advice' when necessary.
* lisp/emacs-lisp/advice.el (ad-add-advice): Likewhise.
Diffstat (limited to 'lisp/emacs-lisp/advice.el')
-rw-r--r-- | lisp/emacs-lisp/advice.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 0ebd2741d2e..4c19197024d 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -2075,6 +2075,8 @@ mapped to the closest extremal position). If FUNCTION was not advised already, its advice info will be initialized. Redefining a piece of advice whose name is part of the cache-id will clear the cache." + (when (subr-primitive-p (symbol-function function)) + (comp--subr-safe-advice function)) (cond ((not (ad-is-advised function)) (ad-initialize-advice-info function) (ad-set-advice-info-field |