[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: incorrect button highlighting
From: |
Stefan Monnier |
Subject: |
Re: incorrect button highlighting |
Date: |
Fri, 21 Sep 2007 09:25:21 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) |
> If the bug is simply due to using the a fixed value of mouse-face
> on every widget, does this fix it?
> *** wid-edit.el 12 Aug 2007 13:52:30 -0400 1.176.2.2
> --- wid-edit.el 20 Sep 2007 16:51:56 -0400
> ***************
> *** 405,411 ****
> (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)))
> (overlay-put overlay 'pointer 'hand)
> (overlay-put overlay 'follow-link follow-link)
> (overlay-put overlay 'help-echo help-echo)))
> --- 405,421 ----
> (unless (widget-get widget :suppress-face)
> (overlay-put overlay 'face (widget-apply widget :button-face-get))
> (overlay-put overlay 'mouse-face
> ! ;; 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)))
This problem should only appear with text properties: with overlays, Emacs
should be clever enough to use the end of the overlay as a boundary.
Stefan
Re: incorrect button highlighting, Stefan Monnier, 2007/09/20