aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Berman2013-07-30 16:42:15 -0400
committerStefan Monnier2013-07-30 16:42:15 -0400
commit158bc55c6e715be476acacbef2aa8ca9b50c94c6 (patch)
tree986f060c205d15818af98c45797dd16d4ba2943c
parentac38e731d9113628bd6823372d11b895f67a5e33 (diff)
downloademacs-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/ChangeLog5
-rw-r--r--lisp/minibuffer.el11
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 @@
12013-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
12013-07-30 Lars Magne Ingebrigtsen <larsi@gnus.org> 62013-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.