aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-09-16 21:31:00 +0000
committerKarl Heuer1994-09-16 21:31:00 +0000
commit7c70cfd377e681e37bde2f318518e147864a609d (patch)
tree44f75d4cad000dce2e5e75984b65e4b10c4fe511 /src
parent5e9c82960a05c492b144bd1c06931748ecf4e0f3 (diff)
downloademacs-7c70cfd377e681e37bde2f318518e147864a609d.tar.gz
emacs-7c70cfd377e681e37bde2f318518e147864a609d.zip
(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')
-rw-r--r--src/minibuf.c5
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)
269 /* VAL is the string of minibuffer text. */ 269 /* VAL is the string of minibuffer text. */
270 last_minibuf_string = val; 270 last_minibuf_string = val;
271 271
272 /* Add the value to the appropriate history list. */ 272 /* Add the value to the appropriate history list unless it is empty. */
273 if (XTYPE (Vminibuffer_history_variable) == Lisp_Symbol 273 if (XSTRING (val)->size != 0
274 && XTYPE (Vminibuffer_history_variable) == Lisp_Symbol
274 && ! EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound)) 275 && ! EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound))
275 { 276 {
276 /* If the caller wanted to save the value read on a history list, 277 /* If the caller wanted to save the value read on a history list,