Commit 7c70cfd3 authored by Karl Heuer's avatar Karl Heuer
Browse files

(read_minibuf): Don't add to the history list if the minibuffer string is

empty, since it is not very useful.
parent 5e9c8296
......@@ -269,8 +269,9 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos)
/* VAL is the string of minibuffer text. */
last_minibuf_string = val;
/* Add the value to the appropriate history list. */
if (XTYPE (Vminibuffer_history_variable) == Lisp_Symbol
/* Add the value to the appropriate history list unless it is empty. */
if (XSTRING (val)->size != 0
&& XTYPE (Vminibuffer_history_variable) == Lisp_Symbol
&& ! EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound))
{
/* If the caller wanted to save the value read on a history list,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment