Commit 457d37ba authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(completion-hilit-commonality): Revert last change:

the leftover code was actually useful.
parent 9d4190b2
2008-05-02 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el (completion-hilit-commonality): Revert last change:
the leftover code was actually useful.
2008-05-02 Sam Steingold <sds@gnu.org> 2008-05-02 Sam Steingold <sds@gnu.org>
   
* vc.el (vc-dir-mode-map): Enable mouse bindings. * vc.el (vc-dir-mode-map): Enable mouse bindings.
...@@ -8,8 +13,8 @@ ...@@ -8,8 +13,8 @@
   
2008-05-02 Nick Roberts <nickrob@snap.net.nz> 2008-05-02 Nick Roberts <nickrob@snap.net.nz>
   
* progmodes/gdb-ui.el (gdb-info-breakpoints-custom): Don't * progmodes/gdb-ui.el (gdb-info-breakpoints-custom):
throw error if no file is found. Don't throw error if no file is found.
   
2008-05-02 Juanma Barranquero <lekktu@gmail.com> 2008-05-02 Juanma Barranquero <lekktu@gmail.com>
   
...@@ -18,7 +23,7 @@ ...@@ -18,7 +23,7 @@
   
2008-05-02 Richard Sharman <rsharman@pobox.com> 2008-05-02 Richard Sharman <rsharman@pobox.com>
   
* hilit-chg.el (highlight-changes-mode): Removed references to * hilit-chg.el (highlight-changes-mode): Remove references to
hooks that no longer exist. Because define-minor-mode is used the hooks that no longer exist. Because define-minor-mode is used the
hook highlight-changes-mode-hook exists and can do what both the hook highlight-changes-mode-hook exists and can do what both the
old hooks used to do. The documentation at the top of the file old hooks used to do. The documentation at the top of the file
......
...@@ -654,17 +654,24 @@ of the differing parts is, by contrast, slightly highlighted." ...@@ -654,17 +654,24 @@ of the differing parts is, by contrast, slightly highlighted."
(setcdr last nil) (setcdr last nil)
(nconc (nconc
(mapcar (mapcar
(lambda (str) (lambda (elem)
;; Don't modify the string itself. (let ((str
(setq str (copy-sequence str)) ;; Don't modify the string itself, but a copy, since the
(put-text-property 0 com-str-len ;; the string may be read-only or used for other purposes.
'font-lock-face 'completions-common-part ;; Furthermore, since `completions' may come from
str) ;; display-completion-list, `elem' may be a list.
(if (> (length str) com-str-len) (if (consp elem)
(put-text-property com-str-len (1+ com-str-len) (car (setq elem (cons (copy-sequence (car elem))
'font-lock-face 'completions-first-difference (cdr elem))))
str)) (setq elem (copy-sequence elem)))))
str) (put-text-property 0 com-str-len
'font-lock-face 'completions-common-part
str)
(if (> (length str) com-str-len)
(put-text-property com-str-len (1+ com-str-len)
'font-lock-face 'completions-first-difference
str)))
elem)
completions) completions)
base-size)))) base-size))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment