summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-11-07 12:31:37 +0100
committerAndrea Corallo <akrl@sdf.org>2020-11-07 12:43:06 +0100
commit6c271ffaa808c602e177db4bd2297ff81112147e (patch)
tree4772088053b040d7a4de1ba5b7d1109a8d44a90e /lisp/emacs-lisp
parent4a69e953f34d504809b94a0c4634444d34100039 (diff)
downloademacs-6c271ffaa808c602e177db4bd2297ff81112147e.tar.gz
emacs-6c271ffaa808c602e177db4bd2297ff81112147e.tar.bz2
emacs-6c271ffaa808c602e177db4bd2297ff81112147e.zip
* Fix non native compiled build
* lisp/emacs-lisp/advice.el (ad-add-advice): Do not try to install trampolines in vanilla builds.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/advice.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 509e2551914..086aa98bb0b 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -2077,7 +2077,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))
+ (when (and (featurep 'nativecomp)
+ (subr-primitive-p (symbol-function function)))
(comp-subr-trampoline-install function))
(cond ((not (ad-is-advised function))
(ad-initialize-advice-info function)