changeset 20075:de449ef32afd

(read_minibuf): Return DEFALT here, if minibuffer is empty. (Fread_from_minibuffer, Fcompleting_read): Don't do that here.
author Karl Heuer <kwzh@gnu.org>
date Thu, 16 Oct 1997 18:27:12 +0000
parents 0b680b922b56
children 374e09781f08
files src/minibuf.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/minibuf.c	Thu Oct 16 18:25:42 1997 +0000
+++ b/src/minibuf.c	Thu Oct 16 18:27:12 1997 +0000
@@ -413,6 +413,10 @@
 #endif
 
   /* VAL is the string of minibuffer text.  */
+
+  if (STRINGP (val) && XSTRING (val)->size == 0 && ! NILP (defalt))
+    val = defalt;
+
   last_minibuf_string = val;
 
   /* Add the value to the appropriate history list unless it is empty.  */
@@ -676,8 +680,6 @@
 		      histvar, histpos, default_value,
 		      minibuffer_allow_text_properties,
 		      !NILP (inherit_input_method));
-  if (STRINGP (val) && XSTRING (val)->size == 0 && ! NILP (default_value))
-    val = default_value;
   UNGCPRO;
   return val;
 }
@@ -1256,8 +1258,6 @@
 		      init, prompt, make_number (pos), 0,
 		      histvar, histpos, def, 0,
 		      !NILP (inherit_input_method));
-  if (STRINGP (val) && XSTRING (val)->size == 0 && ! NILP (def))
-    val = def;
   RETURN_UNGCPRO (unbind_to (count, val));
 }