]> git.eshelyaron.com Git - emacs.git/commitdiff
* Fix non native compiled build
authorAndrea Corallo <akrl@sdf.org>
Sat, 7 Nov 2020 11:31:37 +0000 (12:31 +0100)
committerAndrea Corallo <akrl@sdf.org>
Sat, 7 Nov 2020 11:43:06 +0000 (12:43 +0100)
* lisp/emacs-lisp/advice.el (ad-add-advice): Do not try to
install trampolines in vanilla builds.

lisp/emacs-lisp/advice.el

index 509e2551914e56876a9737ba357654075a560f23..086aa98bb0bea83cc8a80282ed987aae81caca97 100644 (file)
@@ -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)