diff lisp/wid-edit.el @ 66336:d9a2701e02cd

* cus-edit.el (custom-button, custom-button-pressed): New vars. (custom-raised-buttons): Add :set spec. (custom-button-unraised, custom-button-pressed-unraised): New faces, so that custom-raised-buttons actually does something. (custom-mode): Use custom-button and custom-button-pressed. * wid-edit.el (widget-specify-button): Don't ignore widget-mouse-face on graphic terminals. (widget-move-and-invoke): Cleanup.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 23 Oct 2005 17:40:38 +0000
parents 1b475d6de39b
children a4d43f085476
line wrap: on
line diff
--- a/lisp/wid-edit.el	Sun Oct 23 17:26:53 2005 +0000
+++ b/lisp/wid-edit.el	Sun Oct 23 17:40:38 2005 +0000
@@ -403,10 +403,7 @@
     ;; 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))
-      ; 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 'mouse-face widget-mouse-face))
     (overlay-put overlay 'pointer 'hand)
     (overlay-put overlay 'follow-link follow-link)
     (overlay-put overlay 'help-echo help-echo)))
@@ -664,11 +661,9 @@
   "Move to where you click, and if it is an active field, invoke it."
   (interactive "e")
   (mouse-set-point event)
-  (if (widget-event-point event)
-      (let* ((pos (widget-event-point event))
-	     (button (get-char-property pos 'button)))
-	(if button
-	    (widget-button-click event)))))
+  (let ((pos (widget-event-point event)))
+    (if (and pos (get-char-property pos 'button))
+	(widget-button-click event))))
 
 ;;; Buttons.