mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(completion-hilit-commonality): Revert last change:
the leftover code was actually useful.
This commit is contained in:
parent
9d4190b2b5
commit
457d37ba22
2 changed files with 26 additions and 14 deletions
|
|
@ -654,17 +654,24 @@ of the differing parts is, by contrast, slightly highlighted."
|
|||
(setcdr last nil)
|
||||
(nconc
|
||||
(mapcar
|
||||
(lambda (str)
|
||||
;; Don't modify the string itself.
|
||||
(setq str (copy-sequence 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))
|
||||
str)
|
||||
(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)))))
|
||||
(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)
|
||||
base-size))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue