diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-06-27 20:59:22 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-06-27 21:42:12 +0100 |
commit | 24f68d6bfc83b5514d928853ffd86b97c53e1623 (patch) | |
tree | 85541ec7a7c0d495b9a19918bdd750066c40ee6a /src | |
parent | 801e19d0ba8e048a9faa5d5169ec4183e41b0148 (diff) | |
download | emacs-24f68d6bfc83b5514d928853ffd86b97c53e1623.tar.gz emacs-24f68d6bfc83b5514d928853ffd86b97c53e1623.tar.bz2 emacs-24f68d6bfc83b5514d928853ffd86b97c53e1623.zip |
src/comp.c (Fcomp__register_subr): Handle advice activation (bug#42038).
Diffstat (limited to 'src')
-rw-r--r-- | src/comp.c | 10 |
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; } |