diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-01-28 13:19:11 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-01-28 13:19:11 -0500 |
commit | 7531bf096eb3f1b0b6612e94eb5211405e049fee (patch) | |
tree | 387cb37020e6256d7491f9407f8f844de90de6be /src/lisp.h | |
parent | 1f5fa1de7fc2f23ebd7e68db219da4faee916a6f (diff) | |
download | emacs-7531bf096eb3f1b0b6612e94eb5211405e049fee.tar.gz emacs-7531bf096eb3f1b0b6612e94eb5211405e049fee.tar.bz2 emacs-7531bf096eb3f1b0b6612e94eb5211405e049fee.zip |
Reduce code duplication in parts of (auto)load&defalias
* src/data.c (defalias): New function, extracted from `Fdefalias`.
(Fdefalias): Use it.
(Ffset): Don't handle `Vautoload_queue` here, handle it in
`defalias` instead.
* src/comp.c (comp--register-subr): Use `defalias` instead of
duplicating its code.
* src/eval.c (load_with_autoload_queue): New function, extracted from
`Fautoload_do_load`.
(Fautoload_do_load): Use it.
(un_autoload): Mark it as static.
* src/fns.c (Frequire): Use it as well.
* src/lisp.h (defalias, load_with_autoload_queue): New declarations.
(un_autoload): Remove declaration.
Diffstat (limited to 'src/lisp.h')
-rw-r--r-- | src/lisp.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h index 8c55ad72a9c..10f45057d50 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -620,6 +620,7 @@ extern bool symbols_with_pos_enabled; extern AVOID args_out_of_range_3 (Lisp_Object, Lisp_Object, Lisp_Object); extern AVOID wrong_type_argument (Lisp_Object, Lisp_Object); extern Lisp_Object default_value (Lisp_Object symbol); +extern void defalias (Lisp_Object symbol, Lisp_Object definition); /* Defined in emacs.c. */ @@ -4366,7 +4367,9 @@ extern AVOID verror (const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0); extern Lisp_Object vformat_string (const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0); -extern void un_autoload (Lisp_Object); +extern Lisp_Object load_with_autoload_queue + (Lisp_Object file, Lisp_Object noerror, Lisp_Object nomessage, + Lisp_Object nosuffix, Lisp_Object must_suffix); extern Lisp_Object call_debugger (Lisp_Object arg); extern void init_eval_once (void); extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object, ...); |