From: Chong Yidong Date: Mon, 5 Mar 2007 14:55:05 +0000 (+0000) Subject: (PC-do-completion): If completion-ignore-case is non-nil, replace X-Git-Tag: emacs-pretest-22.0.96~249 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b89d8a7719611f0d8eafaca7b4b297823160cb15;p=emacs.git (PC-do-completion): If completion-ignore-case is non-nil, replace field with completion string before exiting. --- diff --git a/lisp/complete.el b/lisp/complete.el index cc8f29356b6..b56dc268c04 100644 --- a/lisp/complete.el +++ b/lisp/complete.el @@ -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