From: Juri Linkov Date: Sun, 4 Dec 2005 02:42:29 +0000 (+0000) Subject: (completion-setup-function): Put completions-common-part X-Git-Tag: emacs-pretest-22.0.90~5519 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a0bd072bedc631839f7674094528112f26514606;p=emacs.git (completion-setup-function): Put completions-common-part face on full completion string too (i.e. completion string without completions-first-difference face). --- 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)