]> git.eshelyaron.com Git - emacs.git/commitdiff
(widget-specify-button): Don't merge mouse-face with neighbouring buttons.
authorRichard M. Stallman <rms@gnu.org>
Sat, 22 Sep 2007 11:26:23 +0000 (11:26 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 22 Sep 2007 11:26:23 +0000 (11:26 +0000)
lisp/wid-edit.el

index abb7fb6631e7180441823e2b4039716f5a6efb05..50df4bd56c64a7210c2600b65e4f31defdf227fc 100644 (file)
@@ -405,7 +405,17 @@ new value.")
     (unless (widget-get widget :suppress-face)
       (overlay-put overlay 'face (widget-apply widget :button-face-get))
       (overlay-put overlay 'mouse-face
-                  (widget-apply widget :mouse-face-get)))
+                  ;; Make new list structure for the mouse-face value
+                  ;; so that different widgets will have
+                  ;; different `mouse-face' property values
+                  ;; and will highlight separately.
+                  (let ((mouse-face-value
+                         (widget-apply widget :mouse-face-get)))
+                    ;; If it's a list, copy it.
+                    (if (listp mouse-face-value)
+                        (copy-sequence mouse-face-value)
+                      ;; If it's a symbol, put it in a list.
+                      (list mouse-face-value)))))
     (overlay-put overlay 'pointer 'hand)
     (overlay-put overlay 'follow-link follow-link)
     (overlay-put overlay 'help-echo help-echo)))