From 24f68d6bfc83b5514d928853ffd86b97c53e1623 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 27 Jun 2020 20:59:22 +0100 Subject: [PATCH] src/comp.c (Fcomp__register_subr): Handle advice activation (bug#42038). --- src/comp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; } -- 2.39.5