diff options
| author | Chong Yidong | 2007-03-05 14:55:05 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-03-05 14:55:05 +0000 |
| commit | b89d8a7719611f0d8eafaca7b4b297823160cb15 (patch) | |
| tree | e77ba18371525fee4cdc9615a2edabc37f9cf80c | |
| parent | 50991b39b11c9ae054e1b0ea58aad063ddc5dd24 (diff) | |
| download | emacs-b89d8a7719611f0d8eafaca7b4b297823160cb15.tar.gz emacs-b89d8a7719611f0d8eafaca7b4b297823160cb15.zip | |
(PC-do-completion): If completion-ignore-case is non-nil, replace
field with completion string before exiting.
| -rw-r--r-- | lisp/complete.el | 11 |
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.") | |||
| 404 | 404 | ||
| 405 | ;; Check if buffer contents can already be considered complete | 405 | ;; Check if buffer contents can already be considered complete |
| 406 | (if (and (eq mode 'exit) | 406 | (if (and (eq mode 'exit) |
| 407 | (test-completion-ignore-case str table pred)) | 407 | (test-completion str table pred)) |
| 408 | 'complete | 408 | (progn |
| 409 | ;; If completion-ignore-case is non-nil, insert the | ||
| 410 | ;; completion string since that may have a different case. | ||
| 411 | (when completion-ignore-case | ||
| 412 | (setq str (try-completion str table pred)) | ||
| 413 | (delete-region beg end) | ||
| 414 | (insert str)) | ||
| 415 | 'complete) | ||
| 409 | 416 | ||
| 410 | ;; Do substitutions in directory names | 417 | ;; Do substitutions in directory names |
| 411 | (and filename | 418 | (and filename |