aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1998-02-17 19:44:25 +0000
committerRichard M. Stallman1998-02-17 19:44:25 +0000
commitc923ccc981a34b862ab92e7dfea7eea81282b524 (patch)
tree15dcb4693c24f79d96397e018a92913c96a30ebc /src
parentf014d22e0763191c5d694fa045d30b49e638b3e8 (diff)
downloademacs-c923ccc981a34b862ab92e7dfea7eea81282b524.tar.gz
emacs-c923ccc981a34b862ab92e7dfea7eea81282b524.zip
(read_minibuf): Do use DEFALT in place of empty input
when when expflag is nonzero. (Fread_no_blanks_input): Arg INIT renamed to INITIAL.
Diffstat (limited to 'src')
-rw-r--r--src/minibuf.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index 5e9bfe13b0b..e0bf54aaf32 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -469,6 +469,10 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
469 unsigned char *p; 469 unsigned char *p;
470 int pos; 470 int pos;
471 471
472 if (STRINGP (val) && XSTRING (val)->size == 0
473 && STRINGP (defalt))
474 val = defalt;
475
472 expr_and_pos = Fread_from_string (val, Qnil, Qnil); 476 expr_and_pos = Fread_from_string (val, Qnil, Qnil);
473 pos = XINT (Fcdr (expr_and_pos)); 477 pos = XINT (Fcdr (expr_and_pos));
474 if (pos != XSTRING (val)->size) 478 if (pos != XSTRING (val)->size)
@@ -752,18 +756,18 @@ Fifth arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits\n\
752} 756}
753 757
754DEFUN ("read-no-blanks-input", Fread_no_blanks_input, Sread_no_blanks_input, 1, 3, 0, 758DEFUN ("read-no-blanks-input", Fread_no_blanks_input, Sread_no_blanks_input, 1, 3, 0,
755 "Args PROMPT and INIT, strings. Read a string from the terminal, not allowing blanks.\n\ 759 "Read a string from the terminal, not allowing blanks.\n\
756Prompt with PROMPT, and provide INIT as an initial value of the input string.\n\ 760Prompt with PROMPT, and provide INITIAL as an initial value of the input string.\n\
757Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits\n\ 761Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits\n\
758the current input method and the setting of enable-multibyte-characters.") 762the current input method and the setting of enable-multibyte-characters.")
759 (prompt, init, inherit_input_method) 763 (prompt, initial, inherit_input_method)
760 Lisp_Object prompt, init, inherit_input_method; 764 Lisp_Object prompt, initial, inherit_input_method;
761{ 765{
762 CHECK_STRING (prompt, 0); 766 CHECK_STRING (prompt, 0);
763 if (! NILP (init)) 767 if (! NILP (initial))
764 CHECK_STRING (init, 1); 768 CHECK_STRING (initial, 1);
765 769
766 return read_minibuf (Vminibuffer_local_ns_map, init, prompt, Qnil, 770 return read_minibuf (Vminibuffer_local_ns_map, initial, prompt, Qnil,
767 0, Qminibuffer_history, make_number (0), Qnil, 0, 771 0, Qminibuffer_history, make_number (0), Qnil, 0,
768 !NILP (inherit_input_method)); 772 !NILP (inherit_input_method));
769} 773}