From: Stefan Monnier <monnier@iro.umontreal.ca>
To: rms@gnu.org
Cc: Glenn Morris <rgm@gnu.org>, dann@ics.uci.edu, emacs-devel@gnu.org
Subject: Re: incorrect button highlighting
Date: Fri, 21 Sep 2007 09:25:21 -0400 [thread overview]
Message-ID: <jwvk5qki22v.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1IYhXo-0004Pd-4h@fencepost.gnu.org> (Richard Stallman's message of "Fri\, 21 Sep 2007 08\:23\:40 -0400")
> 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
next prev parent reply other threads:[~2007-09-21 13:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-11 17:21 incorrect button highlighting Dan Nicolaescu
2007-09-17 6:20 ` Glenn Morris
2007-09-20 8:05 ` Glenn Morris
2007-09-20 18:28 ` Stephen Berman
2007-09-20 18:50 ` Stefan Monnier
2007-09-21 12:23 ` Richard Stallman
2007-09-21 13:25 ` Stefan Monnier [this message]
2007-09-22 11:57 ` Richard Stallman
2007-09-20 18:56 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvk5qki22v.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
--cc=rgm@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).