summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-01-17 16:50:16 +0100
committerAndrea Corallo <akrl@sdf.org>2021-01-17 17:01:51 +0100
commit883d937320a8be2bdc6d0ab7b5dd9551cbfeebd4 (patch)
tree8c5c8534501d51f76ef34772207812cf8d88ec15 /lisp/emacs-lisp
parent88100bed0af530f04cf56acca9f9d1bb12b45771 (diff)
downloademacs-883d937320a8be2bdc6d0ab7b5dd9551cbfeebd4.tar.gz
emacs-883d937320a8be2bdc6d0ab7b5dd9551cbfeebd4.tar.bz2
emacs-883d937320a8be2bdc6d0ab7b5dd9551cbfeebd4.zip
Make `comp-enable-subr-trampolines' effective for advices (bug#45854)
* src/comp.c: Copyright update. (syms_of_comp): Update `comp-enable-subr-trampolines' doc. * lisp/emacs-lisp/comp.el (comp-subr-trampoline-install): Check for `comp-enable-subr-trampolines'.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/comp.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index d127cea449e..238d86f7d51 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3668,7 +3668,8 @@ Return the trampoline if found or nil otherwise."
;;;###autoload
(defun comp-subr-trampoline-install (subr-name)
"Make SUBR-NAME effectively advice-able when called from native code."
- (unless (or (memq subr-name comp-never-optimize-functions)
+ (unless (or (null comp-enable-subr-trampolines)
+ (memq subr-name comp-never-optimize-functions)
(gethash subr-name comp-installed-trampolines-h))
(cl-assert (subr-primitive-p (symbol-function subr-name)))
(comp--install-trampoline