/* String to add to the history. */
Lisp_Object histstring;
Lisp_Object histval;
- bool nohist = false;
Lisp_Object empty_minibuf;
/* Don't allow the user to undo past this point. */
bset_undo_list (current_buffer, Qnil);
- /* Cache the buffer-local value. */
- nohist = NILP (find_symbol_value (Qhistory_add_new_input));
-
recursive_edit_1 ();
/* If cursor is on the minibuffer line,
else
histstring = Qnil;
+ /* Add the value to the appropriate history list, if any. This is
+ done after the previous buffer has been made current again, in
+ case the history variable is buffer-local. */
+ if (! (NILP (Vhistory_add_new_input) || NILP (histstring)))
+ call2 (Qadd_to_history, histvar, histstring);
+
/* The appropriate frame will get selected
in set-window-configuration. */
unbind_to (count, Qnil);
calling_frame))))
call2 (Qselect_frame_set_input_focus, calling_frame, Qnil);
- /* Add the value to the appropriate history list, if any. This is
- done after the previous buffer has been made current again, in
- case the history variable is buffer-local. */
- if (! (nohist || NILP (histstring)))
- call2 (Qadd_to_history, histvar, histstring);
-
/* If Lisp form desired instead of string, parse it. */
if (expflag)
val = string_to_object (val, defalt);
Fset (Qcustom_variable_history, Qnil);
DEFSYM (Qminibuffer_history, "minibuffer-history");
- DEFSYM (Qhistory_add_new_input, "history-add-new-input");
DEFSYM (Qbuffer_name_history, "buffer-name-history");
Fset (Qbuffer_name_history, Qnil);