From: Juanma Barranquero Date: Sun, 14 Oct 2007 18:02:05 +0000 (+0000) Subject: (Ffset): Save autoload of the function being set. X-Git-Tag: emacs-pretest-22.1.90~610 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe4cd268c7b3a0f6c78939a6ad3e12ff9b2295f5;p=emacs.git (Ffset): Save autoload of the function being set. --- diff --git a/src/ChangeLog b/src/ChangeLog index 27662e950a2..2317e4302a9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2007-10-14 Juanma Barranquero + + * eval.c (do_autoload): Don't save autoloads. + + * data.c (Ffset): Save autoload of the function being set. + 2007-10-07 John Paul Wallington * xfns.c (x_create_tip_frame): Set the `display-type' frame @@ -63,7 +69,7 @@ 2007-10-01 Juanma Barranquero - * lread.c (Fload): Fix typo in docstring. + * lread.c (Fload): Fix typo in docstring. 2007-09-29 Juri Linkov diff --git a/src/data.c b/src/data.c index 5e7453e9d42..f954116f32e 100644 --- a/src/data.c +++ b/src/data.c @@ -662,12 +662,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)))