]> git.eshelyaron.com Git - emacs.git/commitdiff
(read_minibuf): Don't add to the history list if the minibuffer string is
authorKarl Heuer <kwzh@gnu.org>
Fri, 16 Sep 1994 21:31:00 +0000 (21:31 +0000)
committerKarl Heuer <kwzh@gnu.org>
Fri, 16 Sep 1994 21:31:00 +0000 (21:31 +0000)
empty, since it is not very useful.

src/minibuf.c

index f00113282dd096372ab1b9c09ffccd19e08515c0..b443ddcc740676253365f58c2a503ae66e820f48 100644 (file)
@@ -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,