aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuri Linkov2006-05-31 21:11:07 +0000
committerJuri Linkov2006-05-31 21:11:07 +0000
commit179a4ca7f903042317f9ea514d6647bcdd74a568 (patch)
tree7c77edad7b36ff0215ad366ce352684502b63230 /src
parent12e224253631ad277706990ed1becf75f8f5a0f3 (diff)
downloademacs-179a4ca7f903042317f9ea514d6647bcdd74a568.tar.gz
emacs-179a4ca7f903042317f9ea514d6647bcdd74a568.zip
(Vhistory_add_new_input): New variable.
(read_minibuf): Use it. (syms_of_minibuf) <history-add-new-input>: New Lisp variable. (syms_of_minibuf) <history-delete-duplicates>: Doc fix.
Diffstat (limited to 'src')
-rw-r--r--src/minibuf.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index ff56eca3241..86d24e6647c 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -66,6 +66,10 @@ Lisp_Object Qhistory_length, Vhistory_length;
66 66
67int history_delete_duplicates; 67int history_delete_duplicates;
68 68
69/* Non-nil means add new input to history. */
70
71Lisp_Object Vhistory_add_new_input;
72
69/* Fread_minibuffer leaves the input here as a string. */ 73/* Fread_minibuffer leaves the input here as a string. */
70 74
71Lisp_Object last_minibuf_string; 75Lisp_Object last_minibuf_string;
@@ -753,7 +757,8 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
753 histstring = Qnil; 757 histstring = Qnil;
754 758
755 /* Add the value to the appropriate history list, if any. */ 759 /* Add the value to the appropriate history list, if any. */
756 if (SYMBOLP (Vminibuffer_history_variable) 760 if (!NILP (Vhistory_add_new_input)
761 && SYMBOLP (Vminibuffer_history_variable)
757 && !NILP (histstring)) 762 && !NILP (histstring))
758 { 763 {
759 /* If the caller wanted to save the value read on a history list, 764 /* If the caller wanted to save the value read on a history list,
@@ -2800,9 +2805,16 @@ property of a history variable overrides this default. */);
2800 DEFVAR_BOOL ("history-delete-duplicates", &history_delete_duplicates, 2805 DEFVAR_BOOL ("history-delete-duplicates", &history_delete_duplicates,
2801 doc: /* *Non-nil means to delete duplicates in history. 2806 doc: /* *Non-nil means to delete duplicates in history.
2802If set to t when adding a new history element, all previous identical 2807If set to t when adding a new history element, all previous identical
2803elements are deleted. */); 2808elements are deleted from the history list. */);
2804 history_delete_duplicates = 0; 2809 history_delete_duplicates = 0;
2805 2810
2811 DEFVAR_LISP ("history-add-new-input", &Vhistory_add_new_input,
2812 doc: /* *Non-nil means to add new elements in history.
2813If set to nil, minibuffer reading functions don't add new elements to the
2814history list, so it is possible to do this afterwards by calling
2815`add-to-history' explicitly. */);
2816 Vhistory_add_new_input = Qt;
2817
2806 DEFVAR_LISP ("completion-auto-help", &Vcompletion_auto_help, 2818 DEFVAR_LISP ("completion-auto-help", &Vcompletion_auto_help,
2807 doc: /* *Non-nil means automatically provide help for invalid completion input. 2819 doc: /* *Non-nil means automatically provide help for invalid completion input.
2808Under Partial Completion mode, a non-nil, non-t value has a special meaning; 2820Under Partial Completion mode, a non-nil, non-t value has a special meaning;