summaryrefslogtreecommitdiff
path: root/lisp/wid-edit.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-09 08:52:57 +0000
committerMiles Bader <miles@gnu.org>2007-10-09 08:52:57 +0000
commit1af74d06e5bdafad9d629d2ed729c5d743cfaf0f (patch)
tree0360965ec0ad2736ffee01cce4f040c6b0a99133 /lisp/wid-edit.el
parenteceb3266a1f66a0034954aa82efbb20a5be959f8 (diff)
parent4b70e299ef66906fd285198003c72a1439d1f252 (diff)
downloademacs-1af74d06e5bdafad9d629d2ed729c5d743cfaf0f.tar.gz
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-875
Diffstat (limited to 'lisp/wid-edit.el')
-rw-r--r--lisp/wid-edit.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 6025244abe5..49d519a9ea2 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -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)))
@@ -656,7 +666,9 @@ button is pressed or inactive, respectively. These are currently ignored."
(progn (widget-put widget :suppress-face t)
(insert-image image
(propertize
- tag 'mouse-face widget-button-pressed-face)))
+ ;; Use a `list' so it's unique and won't get
+ ;; accidentally merged with neighbouring images.
+ tag 'mouse-face (list widget-button-pressed-face))))
(insert tag)))
(defun widget-move-and-invoke (event)