Mercurial > emacs
changeset 76336:d24bffa1374c
(PC-do-completion): If completion-ignore-case is non-nil, replace
field with completion string before exiting.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Mon, 05 Mar 2007 14:55:05 +0000 |
parents | dfdf18916e2d |
children | bd3b0e70c410 |
files | lisp/complete.el |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/complete.el Mon Mar 05 14:54:56 2007 +0000 +++ b/lisp/complete.el Mon Mar 05 14:55:05 2007 +0000 @@ -404,8 +404,15 @@ ;; 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