mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 20:00:46 -08:00
(Ffset): Save autoload of the function being set.
This commit is contained in:
parent
d945992e32
commit
764ea377da
1 changed files with 12 additions and 4 deletions
16
src/data.c
16
src/data.c
|
|
@ -663,12 +663,20 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
|
|||
(symbol, definition)
|
||||
register Lisp_Object symbol, definition;
|
||||
{
|
||||
register Lisp_Object function;
|
||||
|
||||
CHECK_SYMBOL (symbol);
|
||||
if (NILP (symbol) || EQ (symbol, Qt))
|
||||
xsignal1 (Qsetting_constant, symbol);
|
||||
if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (symbol)->function, Qunbound))
|
||||
Vautoload_queue = Fcons (Fcons (symbol, XSYMBOL (symbol)->function),
|
||||
Vautoload_queue);
|
||||
|
||||
function = XSYMBOL (symbol)->function;
|
||||
|
||||
if (!NILP (Vautoload_queue) && !EQ (function, Qunbound))
|
||||
Vautoload_queue = Fcons (Fcons (symbol, function), Vautoload_queue);
|
||||
|
||||
if (CONSP (function) && EQ (XCAR (function), Qautoload))
|
||||
Fput (symbol, Qautoload, XCDR (function));
|
||||
|
||||
XSYMBOL (symbol)->function = definition;
|
||||
/* Handle automatic advice activation */
|
||||
if (CONSP (XSYMBOL (symbol)->plist) && !NILP (Fget (symbol, Qad_advice_info)))
|
||||
|
|
@ -752,7 +760,7 @@ Value, if non-nil, is a list \(interactive SPEC). */)
|
|||
Lisp_Object cmd;
|
||||
{
|
||||
Lisp_Object fun = indirect_function (cmd); /* Check cycles. */
|
||||
|
||||
|
||||
if (NILP (fun) || EQ (fun, Qunbound))
|
||||
return Qnil;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue