diff options
| author | Richard M. Stallman | 1998-04-23 21:18:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-04-23 21:18:18 +0000 |
| commit | 225c215740bc2e03d05ba473996c6edcc975bba6 (patch) | |
| tree | ebddef8f3d1dedc784647e399001978f9fd6087f /src | |
| parent | 69b3c6c7ea856083e2512a185a9061cfea8c825c (diff) | |
| download | emacs-225c215740bc2e03d05ba473996c6edcc975bba6.tar.gz emacs-225c215740bc2e03d05ba473996c6edcc975bba6.zip | |
(Fcall_interactively): Truncate command-history here.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callint.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/callint.c b/src/callint.c index cc522c3f76c..1faa448c117 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -35,6 +35,8 @@ Lisp_Object Vcurrent_prefix_arg, Qminus, Qplus; | |||
| 35 | Lisp_Object Qcall_interactively; | 35 | Lisp_Object Qcall_interactively; |
| 36 | Lisp_Object Vcommand_history; | 36 | Lisp_Object Vcommand_history; |
| 37 | 37 | ||
| 38 | extern Lisp_Object Vhistory_length; | ||
| 39 | |||
| 38 | Lisp_Object Vcommand_debug_status, Qcommand_debug_status; | 40 | Lisp_Object Vcommand_debug_status, Qcommand_debug_status; |
| 39 | Lisp_Object Qenable_recursive_minibuffers; | 41 | Lisp_Object Qenable_recursive_minibuffers; |
| 40 | 42 | ||
| @@ -345,6 +347,14 @@ Otherwise, this is done only if an arg is read using the minibuffer.") | |||
| 345 | } | 347 | } |
| 346 | Vcommand_history | 348 | Vcommand_history |
| 347 | = Fcons (Fcons (function, values), Vcommand_history); | 349 | = Fcons (Fcons (function, values), Vcommand_history); |
| 350 | |||
| 351 | /* Don't keep command history around forever. */ | ||
| 352 | if (NUMBERP (Vhistory_length) && XINT (Vhistory_length) > 0) | ||
| 353 | { | ||
| 354 | teml = Fnthcdr (Vhistory_length, Vcommand_history); | ||
| 355 | if (CONSP (teml)) | ||
| 356 | XCONS (teml)->cdr = Qnil; | ||
| 357 | } | ||
| 348 | } | 358 | } |
| 349 | single_kboard_state (); | 359 | single_kboard_state (); |
| 350 | return apply1 (function, specs); | 360 | return apply1 (function, specs); |
| @@ -728,6 +738,13 @@ Otherwise, this is done only if an arg is read using the minibuffer.") | |||
| 728 | } | 738 | } |
| 729 | Vcommand_history = Fcons (Flist (count + 1, visargs), | 739 | Vcommand_history = Fcons (Flist (count + 1, visargs), |
| 730 | Vcommand_history); | 740 | Vcommand_history); |
| 741 | /* Don't keep command history around forever. */ | ||
| 742 | if (NUMBERP (Vhistory_length) && XINT (Vhistory_length) > 0) | ||
| 743 | { | ||
| 744 | teml = Fnthcdr (Vhistory_length, Vcommand_history); | ||
| 745 | if (CONSP (teml)) | ||
| 746 | XCONS (teml)->cdr = Qnil; | ||
| 747 | } | ||
| 731 | } | 748 | } |
| 732 | 749 | ||
| 733 | /* If we used a marker to hold point, mark, or an end of the region, | 750 | /* If we used a marker to hold point, mark, or an end of the region, |