diff options
| author | Stephen Berman | 2013-07-30 16:42:15 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-07-30 16:42:15 -0400 |
| commit | 158bc55c6e715be476acacbef2aa8ca9b50c94c6 (patch) | |
| tree | 986f060c205d15818af98c45797dd16d4ba2943c | |
| parent | ac38e731d9113628bd6823372d11b895f67a5e33 (diff) | |
| download | emacs-158bc55c6e715be476acacbef2aa8ca9b50c94c6.tar.gz emacs-158bc55c6e715be476acacbef2aa8ca9b50c94c6.zip | |
* lisp/minibuffer.el (completion--twq-all): Try and preserve each
completion's case choice.
Fixes: debbugs:14907
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62a11e229a1..fde62f1fc4d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-07-30 Stephen Berman <stephen.berman@gmx.net> | ||
| 2 | |||
| 3 | * minibuffer.el (completion--twq-all): Try and preserve each | ||
| 4 | completion's case choice (bug#14907). | ||
| 5 | |||
| 1 | 2013-07-30 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2013-07-30 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * net/network-stream.el (open-network-stream): Mention the new | 8 | * net/network-stream.el (open-network-stream): Mention the new |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 8bcf3afae05..e07d28a54d0 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -568,6 +568,17 @@ for use at QPOS." | |||
| 568 | (cl-assert (string-prefix-p prefix completion 'ignore-case) t) | 568 | (cl-assert (string-prefix-p prefix completion 'ignore-case) t) |
| 569 | (let* ((new (substring completion (length prefix))) | 569 | (let* ((new (substring completion (length prefix))) |
| 570 | (qnew (funcall qfun new)) | 570 | (qnew (funcall qfun new)) |
| 571 | (qprefix | ||
| 572 | (if (not completion-ignore-case) | ||
| 573 | qprefix | ||
| 574 | ;; Make qprefix inherit the case from `completion'. | ||
| 575 | (let* ((rest (substring completion | ||
| 576 | 0 (length prefix))) | ||
| 577 | (qrest (funcall qfun rest))) | ||
| 578 | (if (completion--string-equal-p qprefix qrest) | ||
| 579 | (propertize qrest 'face | ||
| 580 | 'completions-common-part) | ||
| 581 | qprefix)))) | ||
| 571 | (qcompletion (concat qprefix qnew))) | 582 | (qcompletion (concat qprefix qnew))) |
| 572 | ;; FIXME: Similarly here, Cygwin's mapping trips this | 583 | ;; FIXME: Similarly here, Cygwin's mapping trips this |
| 573 | ;; assertion. | 584 | ;; assertion. |