]> git.eshelyaron.com Git - emacs.git/commitdiff
(PC-do-completion): If completion-ignore-case is non-nil, replace
authorChong Yidong <cyd@stupidchicken.com>
Mon, 5 Mar 2007 14:55:05 +0000 (14:55 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 5 Mar 2007 14:55:05 +0000 (14:55 +0000)
field with completion string before exiting.

lisp/complete.el

index cc8f29356b6b46919e663837d676dd7746d5e1df..b56dc268c04145604be1ca0b678e718037a27e21 100644 (file)
@@ -404,8 +404,15 @@ of `minibuffer-completion-table' and the minibuffer contents.")
 
     ;; Check if buffer contents can already be considered complete
     (if (and (eq mode 'exit)
-            (test-completion-ignore-case str table pred))
-       'complete
+            (test-completion str table pred))
+       (progn
+         ;; If completion-ignore-case is non-nil, insert the
+         ;; completion string since that may have a different case.
+         (when completion-ignore-case
+           (setq str (try-completion str table pred))
+           (delete-region beg end)
+           (insert str))
+         'complete)
 
       ;; Do substitutions in directory names
       (and filename