]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/data.c (Ffset, defalias): Complete last change
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 29 Jan 2022 04:39:31 +0000 (23:39 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 29 Jan 2022 04:39:31 +0000 (23:39 -0500)
Somehow part of the autoload history handling was left behind in `Ffset`
when the rest was moved to `defalias`.  Finish the job.

* src/data.c (Ffset): Don't set the `autoload` property here...
(defalias): ... set it here instead.

src/data.c

index dd6ec4c41a800fd09ad395298f95e294fe7c37ee..039e6c311341117d248496649bc78afd8bb7b1f6 100644 (file)
@@ -846,9 +846,6 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
 
   function = XSYMBOL (symbol)->u.s.function;
 
-  if (AUTOLOADP (function))
-    Fput (symbol, Qautoload, XCDR (function));
-
   eassert (valid_lisp_object_p (definition));
 
 #ifdef HAVE_NATIVE_COMP
@@ -880,6 +877,9 @@ defalias (Lisp_Object symbol, Lisp_Object definition)
 
         if (!NILP (Vautoload_queue) && !NILP (function))
           Vautoload_queue = Fcons (Fcons (symbol, function), Vautoload_queue);
+
+        if (AUTOLOADP (function))
+          Fput (symbol, Qautoload, XCDR (function));
       }
   }