summaryrefslogtreecommitdiff
path: root/src/comp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp.c')
-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;
}