1
Fork 0
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:
Juanma Barranquero 2007-10-14 17:21:39 +00:00
parent d945992e32
commit 764ea377da

View file

@ -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;