diff options
Diffstat (limited to 'src/callint.c')
| -rw-r--r-- | src/callint.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/src/callint.c b/src/callint.c index 08a8bba4646..fd44494cfee 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -262,7 +262,7 @@ to the function `interactive' at the top level of the function body. | |||
| 262 | See `interactive'. | 262 | See `interactive'. |
| 263 | 263 | ||
| 264 | Optional second arg RECORD-FLAG non-nil | 264 | Optional second arg RECORD-FLAG non-nil |
| 265 | means unconditionally put this command in the command-history. | 265 | means unconditionally put this command in the variable `command-history'. |
| 266 | Otherwise, this is done only if an arg is read using the minibuffer. | 266 | Otherwise, this is done only if an arg is read using the minibuffer. |
| 267 | 267 | ||
| 268 | Optional third arg KEYS, if given, specifies the sequence of events to | 268 | Optional third arg KEYS, if given, specifies the sequence of events to |
| @@ -328,18 +328,8 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 328 | and turn them into things we can eval. */ | 328 | and turn them into things we can eval. */ |
| 329 | Lisp_Object values = quotify_args (Fcopy_sequence (specs)); | 329 | Lisp_Object values = quotify_args (Fcopy_sequence (specs)); |
| 330 | fix_command (input, values); | 330 | fix_command (input, values); |
| 331 | Lisp_Object this_cmd = Fcons (function, values); | 331 | call4 (intern ("add-to-history"), intern ("command-history"), |
| 332 | if (history_delete_duplicates) | 332 | Fcons (function, values), Qnil, Qt); |
| 333 | Vcommand_history = Fdelete (this_cmd, Vcommand_history); | ||
| 334 | Vcommand_history = Fcons (this_cmd, Vcommand_history); | ||
| 335 | |||
| 336 | /* Don't keep command history around forever. */ | ||
| 337 | if (INTEGERP (Vhistory_length) && XINT (Vhistory_length) > 0) | ||
| 338 | { | ||
| 339 | Lisp_Object teml = Fnthcdr (Vhistory_length, Vcommand_history); | ||
| 340 | if (CONSP (teml)) | ||
| 341 | XSETCDR (teml, Qnil); | ||
| 342 | } | ||
| 343 | } | 333 | } |
| 344 | 334 | ||
| 345 | Vthis_command = save_this_command; | 335 | Vthis_command = save_this_command; |
| @@ -768,15 +758,8 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 768 | visargs[i] = (varies[i] > 0 | 758 | visargs[i] = (varies[i] > 0 |
| 769 | ? list1 (intern (callint_argfuns[varies[i]])) | 759 | ? list1 (intern (callint_argfuns[varies[i]])) |
| 770 | : quotify_arg (args[i])); | 760 | : quotify_arg (args[i])); |
| 771 | Vcommand_history = Fcons (Flist (nargs - 1, visargs + 1), | 761 | call4 (intern ("add-to-history"), intern ("command-history"), |
| 772 | Vcommand_history); | 762 | Flist (nargs - 1, visargs + 1), Qnil, Qt); |
| 773 | /* Don't keep command history around forever. */ | ||
| 774 | if (INTEGERP (Vhistory_length) && XINT (Vhistory_length) > 0) | ||
| 775 | { | ||
| 776 | Lisp_Object teml = Fnthcdr (Vhistory_length, Vcommand_history); | ||
| 777 | if (CONSP (teml)) | ||
| 778 | XSETCDR (teml, Qnil); | ||
| 779 | } | ||
| 780 | } | 763 | } |
| 781 | 764 | ||
| 782 | /* If we used a marker to hold point, mark, or an end of the region, | 765 | /* If we used a marker to hold point, mark, or an end of the region, |