From: Karl Heuer Date: Thu, 16 Oct 1997 18:27:12 +0000 (+0000) Subject: (read_minibuf): Return DEFALT here, if minibuffer is empty. X-Git-Tag: emacs-20.3~2998 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7019cca7294072aebab263c204fb8335cae31a4b;p=emacs.git (read_minibuf): Return DEFALT here, if minibuffer is empty. (Fread_from_minibuffer, Fcompleting_read): Don't do that here. --- diff --git a/src/minibuf.c b/src/minibuf.c index d5570a12436..c458dce2f4f 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -413,6 +413,10 @@ read_minibuf (map, initial, prompt, backup_n, expflag, #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 @@ DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 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 @@ DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, 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)); }