Mercurial > emacs
changeset 2547:c73c68a87cd5
(defun, defmacro, defvar, defconst):
Attach symbol argument to the list of globals for the input source.
(do_autoload): Save the old autoloads, in case we ever unload.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 17 Apr 1993 01:28:10 +0000 |
parents | c8cd694d70eb |
children | b66eeded6afc |
files | src/eval.c |
diffstat | 1 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/eval.c Sat Apr 17 01:27:53 1993 +0000 +++ b/src/eval.c Sat Apr 17 01:28:10 1993 +0000 @@ -524,6 +524,7 @@ if (!NILP (Vpurify_flag)) defn = Fpurecopy (defn); Ffset (fn_name, defn); + LOADHIST_ATTACH (fn_name); return fn_name; } @@ -545,6 +546,7 @@ if (!NILP (Vpurify_flag)) defn = Fpurecopy (defn); Ffset (fn_name, defn); + LOADHIST_ATTACH (fn_name); return fn_name; } @@ -580,6 +582,7 @@ tem = Fpurecopy (tem); Fput (sym, Qvariable_documentation, tem); } + LOADHIST_ATTACH (sym); return sym; } @@ -611,6 +614,7 @@ tem = Fpurecopy (tem); Fput (sym, Qvariable_documentation, tem); } + LOADHIST_ATTACH (sym); return sym; } @@ -1377,7 +1381,7 @@ Lisp_Object fundef, funname; { int count = specpdl_ptr - specpdl; - Lisp_Object fun, val; + Lisp_Object fun, val, queue, first, second; fun = funname; CHECK_SYMBOL (funname, 0); @@ -1386,6 +1390,19 @@ record_unwind_protect (un_autoload, Vautoload_queue); Vautoload_queue = Qt; Fload (Fcar (Fcdr (fundef)), Qnil, noninteractive ? Qt : Qnil, Qnil); + + /* Save the old autoloads, in case we ever do an unload. */ + queue = Vautoload_queue; + while (CONSP (queue)) + { + first = Fcar (queue); + second = Fcdr (first); + first = Fcar (first); + if (!EQ (second, Qnil)) + Fput(first, Qautoload, (Fcdr (second))); + queue = Fcdr (queue); + } + /* Once loading finishes, don't undo it. */ Vautoload_queue = Qt; unbind_to (count, Qnil);