From 7c70cfd377e681e37bde2f318518e147864a609d Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 16 Sep 1994 21:31:00 +0000 Subject: [PATCH] (read_minibuf): Don't add to the history list if the minibuffer string is empty, since it is not very useful. --- src/minibuf.c | 5 +++-- 1 file 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, -- 2.39.5