From: Stephen Berman Date: Tue, 30 Jul 2013 20:42:15 +0000 (-0400) Subject: * lisp/minibuffer.el (completion--twq-all): Try and preserve each X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1688^2~76 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=158bc55c6e715be476acacbef2aa8ca9b50c94c6;p=emacs.git * lisp/minibuffer.el (completion--twq-all): Try and preserve each completion's case choice. Fixes: debbugs:14907 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62a11e229a1..fde62f1fc4d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-07-30 Stephen Berman + + * minibuffer.el (completion--twq-all): Try and preserve each + completion's case choice (bug#14907). + 2013-07-30 Lars Magne Ingebrigtsen * 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." (cl-assert (string-prefix-p prefix completion 'ignore-case) t) (let* ((new (substring completion (length prefix))) (qnew (funcall qfun new)) + (qprefix + (if (not completion-ignore-case) + qprefix + ;; Make qprefix inherit the case from `completion'. + (let* ((rest (substring completion + 0 (length prefix))) + (qrest (funcall qfun rest))) + (if (completion--string-equal-p qprefix qrest) + (propertize qrest 'face + 'completions-common-part) + qprefix)))) (qcompletion (concat qprefix qnew))) ;; FIXME: Similarly here, Cygwin's mapping trips this ;; assertion.