emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Buttons in Customize buffers


From: Eli Zaretskii
Subject: Buttons in Customize buffers
Date: Sat, 22 Jan 2005 13:24:29 +0200

Buttons in Customize buffers used to have a special mouse-face, but
that was removed in favor of changing the mouse pointer shape by this
change:

    2004-06-08  Kim F. Storm  <address@hidden>

            * wid-edit.el (widget-specify-button): Use hand pointer rather
            than mouse-face as visible mouse-over effect.

That is okay for graphics displays, but not for mouse-capable text
terminals, since the latter cannot change the mouse pointer shape.
The MS-DOS terminal is one case, but I'm guessing that non-windows
sessions on an xterm with xt-mouse loaded are suffering from the same
problem.

Is the following change okay to install?

Index: lisp/wid-edit.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/wid-edit.el,v
retrieving revision 1.134
diff -u -r1.134 wid-edit.el
--- lisp/wid-edit.el    27 Dec 2004 16:38:57 -0000      1.134
+++ lisp/wid-edit.el    22 Jan 2005 11:22:52 -0000
@@ -391,7 +391,11 @@
     (overlay-put overlay 'evaporate t)
     ;; We want to avoid the face with image buttons.
     (unless (widget-get widget :suppress-face)
-      (overlay-put overlay 'face (widget-apply widget :button-face-get)))
+      (overlay-put overlay 'face (widget-apply widget :button-face-get))
+      ; Text terminals cannot change mouse pointer shape, so use mouse
+      ; face instead.
+      (or (display-graphic-p)
+         (overlay-put overlay 'mouse-face widget-mouse-face)))
     (overlay-put overlay 'pointer 'hand)
     (overlay-put overlay 'follow-link follow-link)
     (overlay-put overlay 'help-echo help-echo)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]