diff options
| author | Andrea Corallo | 2020-06-28 15:38:48 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-06-28 15:53:08 +0100 |
| commit | 6c7f615ae59b636efe5012f761a25acfd956480d (patch) | |
| tree | e19312195865ab96a416a9c85d5b24fc947ad493 /src/comp.c | |
| parent | 5b8b2982830028303d207d111095e35c90ae6805 (diff) | |
| download | emacs-6c7f615ae59b636efe5012f761a25acfd956480d.tar.gz emacs-6c7f615ae59b636efe5012f761a25acfd956480d.zip | |
* src/comp.c (Fcomp__register_subr): Remove code duplication using Fdefalias.
Diffstat (limited to 'src/comp.c')
| -rw-r--r-- | src/comp.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/comp.c b/src/comp.c index bb416ecb19a..3abcabc8933 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -4780,17 +4780,7 @@ DEFUN ("comp--register-subr", Fcomp__register_subr, Scomp__register_subr, | |||
| 4780 | Lisp_Object tem = | 4780 | Lisp_Object tem = |
| 4781 | make_subr (SYMBOL_NAME (name), minarg, maxarg, c_name, doc_idx, intspec, | 4781 | make_subr (SYMBOL_NAME (name), minarg, maxarg, c_name, doc_idx, intspec, |
| 4782 | comp_u); | 4782 | comp_u); |
| 4783 | 4783 | Fdefalias (name, tem, Qnil); | |
| 4784 | LOADHIST_ATTACH (Fcons (Qdefun, name)); | ||
| 4785 | |||
| 4786 | { /* Handle automatic advice activation (bug#42038). | ||
| 4787 | See `defalias'. */ | ||
| 4788 | Lisp_Object hook = Fget (name, Qdefalias_fset_function); | ||
| 4789 | if (!NILP (hook)) | ||
| 4790 | call2 (hook, name, tem); | ||
| 4791 | else | ||
| 4792 | Ffset (name, tem); | ||
| 4793 | } | ||
| 4794 | 4784 | ||
| 4795 | return tem; | 4785 | return tem; |
| 4796 | } | 4786 | } |