summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-06-27 20:59:22 +0100
committerAndrea Corallo <akrl@sdf.org>2020-06-27 21:42:12 +0100
commit24f68d6bfc83b5514d928853ffd86b97c53e1623 (patch)
tree85541ec7a7c0d495b9a19918bdd750066c40ee6a
parent801e19d0ba8e048a9faa5d5169ec4183e41b0148 (diff)
downloademacs-24f68d6bfc83b5514d928853ffd86b97c53e1623.tar.gz
emacs-24f68d6bfc83b5514d928853ffd86b97c53e1623.tar.bz2
emacs-24f68d6bfc83b5514d928853ffd86b97c53e1623.zip
src/comp.c (Fcomp__register_subr): Handle advice activation (bug#42038).
-rw-r--r--src/comp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/comp.c b/src/comp.c
index 29aa6352085..6909aefda76 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4769,9 +4769,17 @@ DEFUN ("comp--register-subr", Fcomp__register_subr, Scomp__register_subr,
make_subr (SYMBOL_NAME (name), minarg, maxarg, c_name, doc_idx, intspec,
comp_u);
- set_symbol_function (name, tem);
LOADHIST_ATTACH (Fcons (Qdefun, name));
+ { /* Handle automatic advice activation (bug#42038).
+ See `defalias'. */
+ Lisp_Object hook = Fget (name, Qdefalias_fset_function);
+ if (!NILP (hook))
+ call2 (hook, name, tem);
+ else
+ Ffset (name, tem);
+ }
+
return tem;
}