summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-06-29 17:26:29 +0200
committerAndrea Corallo <akrl@sdf.org>2020-06-29 17:26:29 +0200
commitd3ac3534b45f50769d866c25e795d4ca20572a18 (patch)
tree6b6fba14ad7dc76356ad06914b3dde919ab51e32
parent0ce4bf3ede9be928062abe47675345375e01d3c0 (diff)
downloademacs-d3ac3534b45f50769d866c25e795d4ca20572a18.tar.gz
emacs-d3ac3534b45f50769d866c25e795d4ca20572a18.tar.bz2
emacs-d3ac3534b45f50769d866c25e795d4ca20572a18.zip
Revert "* src/comp.c (Fcomp__register_subr): Remove code duplication using Fdefalias."
This reverts commit 6c7f615ae59b636efe5012f761a25acfd956480d.
-rw-r--r--src/comp.c12
1 files changed, 11 insertions, 1 deletions
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;
}