diff options
| author | Dan Nicolaescu | 2009-04-15 00:08:23 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2009-04-15 00:08:23 +0000 |
| commit | d65859c36e21f1e9c44655c19f3d8e34acc3a5cb (patch) | |
| tree | 2960e4ba9f68bfe748d3e2d213e700d9e7ebcef4 /src/callint.c | |
| parent | ade29c44f68b80ac67b1f767c8069bff941c772c (diff) | |
| download | emacs-d65859c36e21f1e9c44655c19f3d8e34acc3a5cb.tar.gz emacs-d65859c36e21f1e9c44655c19f3d8e34acc3a5cb.zip | |
* fileio.c (history_delete_duplicates): Remove unused declaration.
* callint.c (history_delete_duplicates): New declaration.
(Fcall_interactively): Remove command history duplicates when
history_delete_duplicates is true.
Diffstat (limited to 'src/callint.c')
| -rw-r--r-- | src/callint.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/callint.c b/src/callint.c index 3641fbc5b77..074f9c0fc5b 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -42,6 +42,7 @@ Lisp_Object Vcommand_history; | |||
| 42 | 42 | ||
| 43 | extern Lisp_Object Vhistory_length; | 43 | extern Lisp_Object Vhistory_length; |
| 44 | extern Lisp_Object Vthis_original_command, real_this_command; | 44 | extern Lisp_Object Vthis_original_command, real_this_command; |
| 45 | extern int history_delete_duplicates; | ||
| 45 | 46 | ||
| 46 | Lisp_Object Vcommand_debug_status, Qcommand_debug_status; | 47 | Lisp_Object Vcommand_debug_status, Qcommand_debug_status; |
| 47 | Lisp_Object Qenable_recursive_minibuffers; | 48 | Lisp_Object Qenable_recursive_minibuffers; |
| @@ -366,12 +367,15 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 366 | { | 367 | { |
| 367 | /* We should record this command on the command history. */ | 368 | /* We should record this command on the command history. */ |
| 368 | Lisp_Object values; | 369 | Lisp_Object values; |
| 370 | Lisp_Object this_cmd; | ||
| 369 | /* Make a copy of the list of values, for the command history, | 371 | /* Make a copy of the list of values, for the command history, |
| 370 | and turn them into things we can eval. */ | 372 | and turn them into things we can eval. */ |
| 371 | values = quotify_args (Fcopy_sequence (specs)); | 373 | values = quotify_args (Fcopy_sequence (specs)); |
| 372 | fix_command (input, values); | 374 | fix_command (input, values); |
| 373 | Vcommand_history | 375 | this_cmd = Fcons (function, values); |
| 374 | = Fcons (Fcons (function, values), Vcommand_history); | 376 | if (history_delete_duplicates) |
| 377 | Vcommand_history = Fdelete (this_cmd, Vcommand_history); | ||
| 378 | Vcommand_history = Fcons (this_cmd, Vcommand_history); | ||
| 375 | 379 | ||
| 376 | /* Don't keep command history around forever. */ | 380 | /* Don't keep command history around forever. */ |
| 377 | if (INTEGERP (Vhistory_length) && XINT (Vhistory_length) > 0) | 381 | if (INTEGERP (Vhistory_length) && XINT (Vhistory_length) > 0) |