From d3ac3534b45f50769d866c25e795d4ca20572a18 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Mon, 29 Jun 2020 17:26:29 +0200 Subject: [PATCH] Revert "* src/comp.c (Fcomp__register_subr): Remove code duplication using Fdefalias." This reverts commit 6c7f615ae59b636efe5012f761a25acfd956480d. --- src/comp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/comp.c b/src/comp.c index 28f10bed6d1..2464b58dad7 100644 --- a/src/comp.c +++ b/src/comp.c @@ -4787,7 +4787,17 @@ DEFUN ("comp--register-subr", Fcomp__register_subr, Scomp__register_subr, Lisp_Object tem = make_subr (SYMBOL_NAME (name), minarg, maxarg, c_name, doc_idx, intspec, comp_u); - Fdefalias (name, tem, Qnil); + + 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