summaryrefslogtreecommitdiff
path: root/lisp/complete.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2007-03-05 14:55:05 +0000
committerChong Yidong <cyd@stupidchicken.com>2007-03-05 14:55:05 +0000
commit0eaf6b0ef7e49a9ddd1aa0125d19f7190042d50c (patch)
treed57c4a2e308f2372ad7818a6334a753aa4663fa3 /lisp/complete.el
parent8bdc44de1f14356f19f2afbb908cbc442ec53e28 (diff)
downloademacs-0eaf6b0ef7e49a9ddd1aa0125d19f7190042d50c.tar.gz
(PC-do-completion): If completion-ignore-case is non-nil, replace
field with completion string before exiting.
Diffstat (limited to 'lisp/complete.el')
-rw-r--r--lisp/complete.el11
1 files changed, 9 insertions, 2 deletions
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