changeset 8790:af08b3d2e30f

(read_minibuf): Don't add to the history list if the minibuffer string is empty, since it is not very useful.
author Karl Heuer <kwzh@gnu.org>
date Fri, 16 Sep 1994 21:31:00 +0000
parents 81a2817b99b2
children 555762c754a6
files src/minibuf.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/minibuf.c	Fri Sep 16 21:16:20 1994 +0000
+++ b/src/minibuf.c	Fri Sep 16 21:31:00 1994 +0000
@@ -269,8 +269,9 @@
   /* 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,