diff options
| author | Richard M. Stallman | 1993-04-17 01:28:10 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-04-17 01:28:10 +0000 |
| commit | 2a49b6e5194275ff5fea3844370fea00092e41f5 (patch) | |
| tree | a14c21275e465d2e8247354ecca6db80fd9a6a4f /src | |
| parent | 68732608c89353215cb68ba6933d553068a1b4a2 (diff) | |
| download | emacs-2a49b6e5194275ff5fea3844370fea00092e41f5.tar.gz emacs-2a49b6e5194275ff5fea3844370fea00092e41f5.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/eval.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index e1f56c0c3d0..d12cf8d9fae 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -524,6 +524,7 @@ See also the function `interactive'.") | |||
| 524 | if (!NILP (Vpurify_flag)) | 524 | if (!NILP (Vpurify_flag)) |
| 525 | defn = Fpurecopy (defn); | 525 | defn = Fpurecopy (defn); |
| 526 | Ffset (fn_name, defn); | 526 | Ffset (fn_name, defn); |
| 527 | LOADHIST_ATTACH (fn_name); | ||
| 527 | return fn_name; | 528 | return fn_name; |
| 528 | } | 529 | } |
| 529 | 530 | ||
| @@ -545,6 +546,7 @@ and the result should be a form to be evaluated instead of the original.") | |||
| 545 | if (!NILP (Vpurify_flag)) | 546 | if (!NILP (Vpurify_flag)) |
| 546 | defn = Fpurecopy (defn); | 547 | defn = Fpurecopy (defn); |
| 547 | Ffset (fn_name, defn); | 548 | Ffset (fn_name, defn); |
| 549 | LOADHIST_ATTACH (fn_name); | ||
| 548 | return fn_name; | 550 | return fn_name; |
| 549 | } | 551 | } |
| 550 | 552 | ||
| @@ -580,6 +582,7 @@ If INITVALUE is missing, SYMBOL's value is not set.") | |||
| 580 | tem = Fpurecopy (tem); | 582 | tem = Fpurecopy (tem); |
| 581 | Fput (sym, Qvariable_documentation, tem); | 583 | Fput (sym, Qvariable_documentation, tem); |
| 582 | } | 584 | } |
| 585 | LOADHIST_ATTACH (sym); | ||
| 583 | return sym; | 586 | return sym; |
| 584 | } | 587 | } |
| 585 | 588 | ||
| @@ -611,6 +614,7 @@ it would override the user's choice.") | |||
| 611 | tem = Fpurecopy (tem); | 614 | tem = Fpurecopy (tem); |
| 612 | Fput (sym, Qvariable_documentation, tem); | 615 | Fput (sym, Qvariable_documentation, tem); |
| 613 | } | 616 | } |
| 617 | LOADHIST_ATTACH (sym); | ||
| 614 | return sym; | 618 | return sym; |
| 615 | } | 619 | } |
| 616 | 620 | ||
| @@ -1377,7 +1381,7 @@ do_autoload (fundef, funname) | |||
| 1377 | Lisp_Object fundef, funname; | 1381 | Lisp_Object fundef, funname; |
| 1378 | { | 1382 | { |
| 1379 | int count = specpdl_ptr - specpdl; | 1383 | int count = specpdl_ptr - specpdl; |
| 1380 | Lisp_Object fun, val; | 1384 | Lisp_Object fun, val, queue, first, second; |
| 1381 | 1385 | ||
| 1382 | fun = funname; | 1386 | fun = funname; |
| 1383 | CHECK_SYMBOL (funname, 0); | 1387 | CHECK_SYMBOL (funname, 0); |
| @@ -1386,6 +1390,19 @@ do_autoload (fundef, funname) | |||
| 1386 | record_unwind_protect (un_autoload, Vautoload_queue); | 1390 | record_unwind_protect (un_autoload, Vautoload_queue); |
| 1387 | Vautoload_queue = Qt; | 1391 | Vautoload_queue = Qt; |
| 1388 | Fload (Fcar (Fcdr (fundef)), Qnil, noninteractive ? Qt : Qnil, Qnil); | 1392 | Fload (Fcar (Fcdr (fundef)), Qnil, noninteractive ? Qt : Qnil, Qnil); |
| 1393 | |||
| 1394 | /* Save the old autoloads, in case we ever do an unload. */ | ||
| 1395 | queue = Vautoload_queue; | ||
| 1396 | while (CONSP (queue)) | ||
| 1397 | { | ||
| 1398 | first = Fcar (queue); | ||
| 1399 | second = Fcdr (first); | ||
| 1400 | first = Fcar (first); | ||
| 1401 | if (!EQ (second, Qnil)) | ||
| 1402 | Fput(first, Qautoload, (Fcdr (second))); | ||
| 1403 | queue = Fcdr (queue); | ||
| 1404 | } | ||
| 1405 | |||
| 1389 | /* Once loading finishes, don't undo it. */ | 1406 | /* Once loading finishes, don't undo it. */ |
| 1390 | Vautoload_queue = Qt; | 1407 | Vautoload_queue = Qt; |
| 1391 | unbind_to (count, Qnil); | 1408 | unbind_to (count, Qnil); |