[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116660: * minibuffer.el (completion-hilit-commonali
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r116660: * minibuffer.el (completion-hilit-commonality): Revert 2014-03-01 short-cut, |
Date: |
Tue, 04 Mar 2014 17:01:45 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116660
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16933
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2014-03-04 09:01:37 -0800
message:
* minibuffer.el (completion-hilit-commonality): Revert 2014-03-01 short-cut,
which changed the return value.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/minibuffer.el
minibuffer.el-20091113204419-o5vbwnq5f7feedwu-8622
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-03-04 15:07:59 +0000
+++ b/lisp/ChangeLog 2014-03-04 17:01:37 +0000
@@ -1,3 +1,8 @@
+2014-03-04 Glenn Morris <address@hidden>
+
+ * minibuffer.el (completion-hilit-commonality):
+ Revert 2014-03-01 short-cut, which changed the return value. (Bug#16933)
+
2014-03-04 Juanma Barranquero <address@hidden>
* hilit-chg.el (hilit-chg-unload-function): New function.
=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el 2014-03-04 14:33:56 +0000
+++ b/lisp/minibuffer.el 2014-03-04 17:01:37 +0000
@@ -1597,36 +1597,34 @@
It returns a list with font-lock properties applied to each element,
and with BASE-SIZE appended as the last element."
(when completions
- (if (zerop prefix-len)
- completions
- (let ((com-str-len (- prefix-len (or base-size 0))))
- (nconc
- (mapcar
- (lambda (elem)
- (let ((str
- ;; Don't modify the string itself, but a copy, since the
- ;; the string may be read-only or used for other purposes.
- ;; Furthermore, since `completions' may come from
- ;; display-completion-list, `elem' may be a list.
- (if (consp elem)
- (car (setq elem (cons (copy-sequence (car elem))
- (cdr elem))))
- (setq elem (copy-sequence elem)))))
- (font-lock-prepend-text-property
- 0
- ;; If completion-boundaries returns incorrect
- ;; values, all-completions may return strings
- ;; that don't contain the prefix.
- (min com-str-len (length str))
- 'face 'completions-common-part str)
- (if (> (length str) com-str-len)
- (font-lock-prepend-text-property com-str-len (1+ com-str-len)
- 'face
-
'completions-first-difference
- str)))
- elem)
- completions)
- base-size)))))
+ (let ((com-str-len (- prefix-len (or base-size 0))))
+ (nconc
+ (mapcar
+ (lambda (elem)
+ (let ((str
+ ;; Don't modify the string itself, but a copy, since the
+ ;; the string may be read-only or used for other purposes.
+ ;; Furthermore, since `completions' may come from
+ ;; display-completion-list, `elem' may be a list.
+ (if (consp elem)
+ (car (setq elem (cons (copy-sequence (car elem))
+ (cdr elem))))
+ (setq elem (copy-sequence elem)))))
+ (font-lock-prepend-text-property
+ 0
+ ;; If completion-boundaries returns incorrect
+ ;; values, all-completions may return strings
+ ;; that don't contain the prefix.
+ (min com-str-len (length str))
+ 'face 'completions-common-part str)
+ (if (> (length str) com-str-len)
+ (font-lock-prepend-text-property com-str-len (1+ com-str-len)
+ 'face
+ 'completions-first-difference
+ str)))
+ elem)
+ completions)
+ base-size))))
(defun display-completion-list (completions &optional common-substring)
"Display the list of completions, COMPLETIONS, using `standard-output'.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116660: * minibuffer.el (completion-hilit-commonality): Revert 2014-03-01 short-cut,,
Glenn Morris <=