]> code.delx.au - gnu-emacs/blobdiff - src/minibuf.c
Groff \# comments.
[gnu-emacs] / src / minibuf.c
index 5bb91cf73482baf6db33c38e36b0087a38a1f269..94e06365a917d9bd1641fc0a6ea560ebdce0b395 100644 (file)
@@ -386,7 +386,7 @@ Return (point-min) if current buffer is not a minibuffer.  */)
 DEFUN ("minibuffer-contents", Fminibuffer_contents,
        Sminibuffer_contents, 0, 0, 0,
        doc: /* Return the user input in a minibuffer as a string.
-The current buffer must be a minibuffer.  */)
+If the current buffer is not a minibuffer, return its entire contents.  */)
      ()
 {
   int prompt_end = XINT (Fminibuffer_prompt_end ());
@@ -396,7 +396,7 @@ The current buffer must be a minibuffer.  */)
 DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties,
        Sminibuffer_contents_no_properties, 0, 0, 0,
        doc: /* Return the user input in a minibuffer as a string, without text-properties.
-The current buffer must be a minibuffer.  */)
+If the current buffer is not a minibuffer, return its entire contents.  */)
      ()
 {
   int prompt_end = XINT (Fminibuffer_prompt_end ());
@@ -407,7 +407,7 @@ DEFUN ("minibuffer-completion-contents", Fminibuffer_completion_contents,
        Sminibuffer_completion_contents, 0, 0, 0,
        doc: /* Return the user input in a minibuffer before point as a string.
 That is what completion commands operate on.
-The current buffer must be a minibuffer.  */)
+If the current buffer is not a minibuffer, return its entire contents.  */)
      ()
 {
   int prompt_end = XINT (Fminibuffer_prompt_end ());
@@ -419,7 +419,7 @@ The current buffer must be a minibuffer.  */)
 DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents,
        Sdelete_minibuffer_contents, 0, 0, 0,
        doc: /* Delete all user input in a minibuffer.
-The current buffer must be a minibuffer.  */)
+If the current buffer is not a minibuffer, erase its entire contents.  */)
      ()
 {
   int prompt_end = XINT (Fminibuffer_prompt_end ());
@@ -529,7 +529,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
   GCPRO5 (map, initial, val, ambient_dir, input_method);
 
   if (!STRINGP (prompt))
-    prompt = empty_string;
+    prompt = empty_unibyte_string;
 
   if (!enable_recursive_minibuffers
       && minibuf_level > 0)
@@ -704,7 +704,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
     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)
@@ -1483,6 +1483,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;