From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: incorrect button highlighting Date: Fri, 21 Sep 2007 08:23:40 -0400 Message-ID: References: <200709111721.l8BHL7Di000880@oogie-boogie.ics.uci.edu> <3sodg1olsr.fsf@fencepost.gnu.org> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1190377510 3645 80.91.229.12 (21 Sep 2007 12:25:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Sep 2007 12:25:10 +0000 (UTC) Cc: dann@ics.uci.edu, emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 21 14:25:08 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IYhZD-0007iK-43 for ged-emacs-devel@m.gmane.org; Fri, 21 Sep 2007 14:25:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IYhZB-0006n9-00 for ged-emacs-devel@m.gmane.org; Fri, 21 Sep 2007 08:25:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IYhYR-0006SH-At for emacs-devel@gnu.org; Fri, 21 Sep 2007 08:24:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IYhYP-0006RR-NK for emacs-devel@gnu.org; Fri, 21 Sep 2007 08:24:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IYhYP-0006RM-Hl for emacs-devel@gnu.org; Fri, 21 Sep 2007 08:24:17 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IYhYP-0002UD-7f for emacs-devel@gnu.org; Fri, 21 Sep 2007 08:24:17 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IYhXo-0004Pd-4h; Fri, 21 Sep 2007 08:23:40 -0400 In-reply-to: (message from Glenn Morris on Thu, 20 Sep 2007 04:05:03 -0400) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:79440 Archived-At: Actually, it's nothing to do with widgets. This has the same symptoms: (progn (switch-to-buffer "*example*") (insert-image (create-image "prev-node.xpm") (propertize "prev" 'mouse-face 'custom-button-pressed-face)) (insert-image (create-image "next-node.xpm") (propertize "next" 'mouse-face 'custom-button-pressed-face))) That in itself is not a bug, it is just the way mouse-face works. However, its consequence for widgets is a bug. 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)))