From a0bd072bedc631839f7674094528112f26514606 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 4 Dec 2005 02:42:29 +0000 Subject: [PATCH] (completion-setup-function): Put completions-common-part face on full completion string too (i.e. completion string without completions-first-difference face). --- lisp/simple.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 21e7f46dbba..451c1bc9449 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4970,12 +4970,13 @@ is the substring.)") (< (setq element-common-end (+ element-start common-string-length)) maxp)) - (when (and (get-char-property element-start 'mouse-face) - (get-char-property element-common-end 'mouse-face)) - (put-text-property element-start element-common-end - 'font-lock-face 'completions-common-part) - (put-text-property element-common-end (1+ element-common-end) - 'font-lock-face 'completions-first-difference))))) + (when (get-char-property element-start 'mouse-face) + (if (get-char-property (1- element-common-end) 'mouse-face) + (put-text-property element-start element-common-end + 'font-lock-face 'completions-common-part)) + (if (get-char-property element-common-end 'mouse-face) + (put-text-property element-common-end (1+ element-common-end) + 'font-lock-face 'completions-first-difference)))))) ;; Insert help string. (goto-char (point-min)) (if (display-mouse-p) -- 2.39.5