# HG changeset patch # User Eric S. Raymond # Date 736016898 0 # Node ID 5122736c0a038eefa5f0cf3bb1bf5d94c99c772d # Parent 2189edb3095596e53c8248991a733270cf385463 (do_autoload): Fixed the bug in the autoload-saving code. diff -r 2189edb30955 -r 5122736c0a03 src/eval.c --- a/src/eval.c Wed Apr 28 17:08:14 1993 +0000 +++ b/src/eval.c Wed Apr 28 17:08:18 1993 +0000 @@ -1391,7 +1391,6 @@ Vautoload_queue = Qt; Fload (Fcar (Fcdr (fundef)), Qnil, noninteractive ? Qt : Qnil, Qnil); -#ifdef UNLOAD /* Save the old autoloads, in case we ever do an unload. */ queue = Vautoload_queue; while (CONSP (queue)) @@ -1399,11 +1398,15 @@ first = Fcar (queue); second = Fcdr (first); first = Fcar (first); - if (!EQ (second, Qnil)) + + /* Note: This test is subtle. The cdr of an autoload-queue entry + may be an atom if the autoload entry was generated by a defalias + or fset. */ + if (CONSP (second)) Fput(first, Qautoload, (Fcdr (second))); + queue = Fcdr (queue); } -#endif /* UNLOAD */ /* Once loading finishes, don't undo it. */ Vautoload_queue = Qt;