diff options
author | Miles Bader <miles@gnu.org> | 2007-10-11 16:14:00 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-10-11 16:14:00 +0000 |
commit | ecb21060d5c1752d41d7a742be565c59b5fcb855 (patch) | |
tree | fadebcd18a69457a1d564f738c3f9bdcf512ab4b /lisp/wid-edit.el | |
parent | 42af7493ae7e7a14ee508800c7fa75b65a94c143 (diff) | |
parent | 58ade22bf16a9ec2ff0aee6c59d8db4d1703e94f (diff) | |
download | emacs-ecb21060d5c1752d41d7a742be565c59b5fcb855.tar.gz |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 866-879)
- Merge multi-tty branch
- Update from CVS
- Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
Diffstat (limited to 'lisp/wid-edit.el')
-rw-r--r-- | lisp/wid-edit.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 72cff55805b..c86f8351c7a 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) |