diff options
author | Karl Heuer <kwzh@gnu.org> | 1994-09-16 21:31:00 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1994-09-16 21:31:00 +0000 |
commit | 6e0573411345093a61065b48501986386f44eb0e (patch) | |
tree | faea68210856a8c9e9d4d5cc0238452a29117595 /src/minibuf.c | |
parent | 2bcabc2597b28d7e20bd635c5a20b8d597fa39bd (diff) | |
download | emacs-6e0573411345093a61065b48501986386f44eb0e.tar.gz |
(read_minibuf): Don't add to the history list if the minibuffer string is
empty, since it is not very useful.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r-- | src/minibuf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index f00113282dd..b443ddcc740 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -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, |