diff options
| author | Karl Heuer | 1997-10-16 18:27:12 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-10-16 18:27:12 +0000 |
| commit | 7019cca7294072aebab263c204fb8335cae31a4b (patch) | |
| tree | 4c236b941de6bb3ca2e8f3e695ce9513f134a7f7 /src | |
| parent | 0a59111cbce8734fc2ac9e611ade35b235bad6c0 (diff) | |
| download | emacs-7019cca7294072aebab263c204fb8335cae31a4b.tar.gz emacs-7019cca7294072aebab263c204fb8335cae31a4b.zip | |
(read_minibuf): Return DEFALT here, if minibuffer is empty.
(Fread_from_minibuffer, Fcompleting_read): Don't do that here.
Diffstat (limited to 'src')
| -rw-r--r-- | src/minibuf.c | 8 |
1 files changed, 4 insertions, 4 deletions
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, | |||
| 413 | #endif | 413 | #endif |
| 414 | 414 | ||
| 415 | /* VAL is the string of minibuffer text. */ | 415 | /* VAL is the string of minibuffer text. */ |
| 416 | |||
| 417 | if (STRINGP (val) && XSTRING (val)->size == 0 && ! NILP (defalt)) | ||
| 418 | val = defalt; | ||
| 419 | |||
| 416 | last_minibuf_string = val; | 420 | last_minibuf_string = val; |
| 417 | 421 | ||
| 418 | /* Add the value to the appropriate history list unless it is empty. */ | 422 | /* 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, | |||
| 676 | histvar, histpos, default_value, | 680 | histvar, histpos, default_value, |
| 677 | minibuffer_allow_text_properties, | 681 | minibuffer_allow_text_properties, |
| 678 | !NILP (inherit_input_method)); | 682 | !NILP (inherit_input_method)); |
| 679 | if (STRINGP (val) && XSTRING (val)->size == 0 && ! NILP (default_value)) | ||
| 680 | val = default_value; | ||
| 681 | UNGCPRO; | 683 | UNGCPRO; |
| 682 | return val; | 684 | return val; |
| 683 | } | 685 | } |
| @@ -1256,8 +1258,6 @@ DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, | |||
| 1256 | init, prompt, make_number (pos), 0, | 1258 | init, prompt, make_number (pos), 0, |
| 1257 | histvar, histpos, def, 0, | 1259 | histvar, histpos, def, 0, |
| 1258 | !NILP (inherit_input_method)); | 1260 | !NILP (inherit_input_method)); |
| 1259 | if (STRINGP (val) && XSTRING (val)->size == 0 && ! NILP (def)) | ||
| 1260 | val = def; | ||
| 1261 | RETURN_UNGCPRO (unbind_to (count, val)); | 1261 | RETURN_UNGCPRO (unbind_to (count, val)); |
| 1262 | } | 1262 | } |
| 1263 | 1263 | ||