emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113604: * lisp/minibuffer.el (completion--twq-all):


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r113604: * lisp/minibuffer.el (completion--twq-all): Try and preserve each
Date: Tue, 30 Jul 2013 20:42:24 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113604
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14907
author: Stephen Berman <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2013-07-30 16:42:15 -0400
message:
  * lisp/minibuffer.el (completion--twq-all): Try and preserve each
  completion's case choice.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/minibuffer.el             
minibuffer.el-20091113204419-o5vbwnq5f7feedwu-8622
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-07-30 15:11:58 +0000
+++ b/lisp/ChangeLog    2013-07-30 20:42:15 +0000
@@ -1,3 +1,8 @@
+2013-07-30  Stephen Berman  <address@hidden>
+
+       * minibuffer.el (completion--twq-all): Try and preserve each
+       completion's case choice (bug#14907).
+
 2013-07-30  Lars Magne Ingebrigtsen  <address@hidden>
 
        * net/network-stream.el (open-network-stream): Mention the new

=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el        2013-05-30 03:18:06 +0000
+++ b/lisp/minibuffer.el        2013-07-30 20:42:15 +0000
@@ -568,6 +568,17 @@
                  (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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]