]> git.eshelyaron.com Git - emacs.git/commitdiff
(completion-setup-function): Put completions-common-part
authorJuri Linkov <juri@jurta.org>
Sun, 4 Dec 2005 02:42:29 +0000 (02:42 +0000)
committerJuri Linkov <juri@jurta.org>
Sun, 4 Dec 2005 02:42:29 +0000 (02:42 +0000)
face on full completion string too (i.e. completion string without
completions-first-difference face).

lisp/simple.el

index 21e7f46dbba437c65f80071146aa889d9b5f83e5..451c1bc94497706e3e174b3d50b95a992872e626 100644 (file)
@@ -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)