aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Volpiatto2019-12-06 07:22:57 +0100
committerThierry Volpiatto2019-12-06 07:22:57 +0100
commit4095a006fd90c63179904e2f7a406a36e7f781dc (patch)
treec5409047d87f121bd8ca0fa1fba7183c5ec31945
parent0ca32d1270bd5d494e365f3525fa65ac423f6658 (diff)
downloademacs-4095a006fd90c63179904e2f7a406a36e7f781dc.tar.gz
emacs-4095a006fd90c63179904e2f7a406a36e7f781dc.zip
Fix setting completions* faces in
`completion-pcm--hilit-commonality` so that these faces doesn't override possible already existing faces in other UIs. * lisp/minibuffer.el (completion-pcm--hilit-commonality): Use `add-face-text-property` instead of `put-text-property`.
-rw-r--r--lisp/minibuffer.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 779c3c88ae8..c2183a67ae5 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -3171,18 +3171,21 @@ one-letter-long matches).")
3171 (funcall update-score start start) 3171 (funcall update-score start start)
3172 (while md 3172 (while md
3173 (funcall update-score start (car md)) 3173 (funcall update-score start (car md))
3174 (put-text-property start (pop md) 3174 (add-face-text-property
3175 'face 'completions-common-part 3175 start (pop md)
3176 str) 3176 'completions-common-part
3177 nil str)
3177 (setq start (pop md))) 3178 (setq start (pop md)))
3178 (funcall update-score len len) 3179 (funcall update-score len len)
3179 (put-text-property start end 3180 (add-face-text-property
3180 'face 'completions-common-part 3181 start end
3181 str) 3182 'completions-common-part
3183 nil str)
3182 (if (> (length str) pos) 3184 (if (> (length str) pos)
3183 (put-text-property pos (1+ pos) 3185 (add-face-text-property
3184 'face 'completions-first-difference 3186 pos (1+ pos)
3185 str)) 3187 'completions-first-difference
3188 nil str))
3186 (unless (zerop (length str)) 3189 (unless (zerop (length str))
3187 (put-text-property 3190 (put-text-property
3188 0 1 'completion-score 3191 0 1 'completion-score