diff lisp/wid-edit.el @ 66171:1b475d6de39b

* cus-edit.el (Custom-move-and-invoke): Deleted. (custom-mode-map): Bind mouse-1 to widget-move-and-invoke. * wid-edit.el (widget-move-and-invoke): New function, from Custom-move-and-invoke.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 18 Oct 2005 00:28:57 +0000
parents bcf724ef6a96
children d9a2701e02cd 0ca0d9181b5e
line wrap: on
line diff
--- a/lisp/wid-edit.el	Mon Oct 17 23:46:28 2005 +0000
+++ b/lisp/wid-edit.el	Tue Oct 18 00:28:57 2005 +0000
@@ -660,6 +660,16 @@
 			    tag 'mouse-face widget-button-pressed-face)))
     (insert tag)))
 
+(defun widget-move-and-invoke (event)
+  "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)))))
+
 ;;; Buttons.
 
 (defgroup widget-button nil