aboutsummaryrefslogtreecommitdiffstats
path: root/src/minibuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/minibuf.c')
-rw-r--r--src/minibuf.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index 51a64ffed8..e3fb864161 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -702,27 +702,27 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
specbind (Qinhibit_read_only, Qt);
specbind (Qinhibit_modification_hooks, Qt);
Ferase_buffer ();
+
+ if (!NILP (current_buffer->enable_multibyte_characters)
+ && ! STRING_MULTIBYTE (minibuf_prompt))
+ minibuf_prompt = Fstring_make_multibyte (minibuf_prompt);
+
+ /* Insert the prompt, record where it ends. */
+ Finsert (1, &minibuf_prompt);
+ if (PT > BEG)
+ {
+ Fput_text_property (make_number (BEG), make_number (PT),
+ Qfront_sticky, Qt, Qnil);
+ Fput_text_property (make_number (BEG), make_number (PT),
+ Qrear_nonsticky, Qt, Qnil);
+ Fput_text_property (make_number (BEG), make_number (PT),
+ Qfield, Qt, Qnil);
+ Fadd_text_properties (make_number (BEG), make_number (PT),
+ Vminibuffer_prompt_properties, Qnil);
+ }
unbind_to (count1, Qnil);
}
- if (!NILP (current_buffer->enable_multibyte_characters)
- && ! STRING_MULTIBYTE (minibuf_prompt))
- minibuf_prompt = Fstring_make_multibyte (minibuf_prompt);
-
- /* Insert the prompt, record where it ends. */
- Finsert (1, &minibuf_prompt);
- if (PT > BEG)
- {
- Fput_text_property (make_number (BEG), make_number (PT),
- Qfront_sticky, Qt, Qnil);
- Fput_text_property (make_number (BEG), make_number (PT),
- Qrear_nonsticky, Qt, Qnil);
- Fput_text_property (make_number (BEG), make_number (PT),
- Qfield, Qt, Qnil);
- Fadd_text_properties (make_number (BEG), make_number (PT),
- Vminibuffer_prompt_properties, Qnil);
- }
-
minibuf_prompt_width = (int) current_column (); /* iftc */
/* Put in the initial input. */
@@ -1489,6 +1489,10 @@ is used to further constrain the set of candidates. */)
matchcount++;
bestmatchsize = matchsize;
if (matchsize <= SCHARS (string)
+ /* If completion-ignore-case is non-nil, don't
+ short-circuit because we want to find the best
+ possible match *including* case differences. */
+ && !completion_ignore_case
&& matchcount > 1)
/* No need to look any further. */
break;