changeset 3287:681d0fbb904e

[xemacs-hg @ 2006-03-17 16:50:03 by james] Get widget-move-and-invoke from Emacs, since current Gnus CVS uses it. See xemacs-patches message <m3bqw871ec.fsf@jerrypc.cs.usu.edu>.
author james
date Fri, 17 Mar 2006 16:50:04 +0000
parents b3ab8c197518
children f45c9ff6f425
files lisp/ChangeLog lisp/wid-edit.el
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Mar 17 14:30:45 2006 +0000
+++ b/lisp/ChangeLog	Fri Mar 17 16:50:04 2006 +0000
@@ -1,3 +1,7 @@
+2006-03-14  Jerry James  <james@xemacs.org>
+
+	* wid-edit.el (widget-move-and-invoke): New function, used by Gnus.
+
 2006-02-26  Vin Shelton  <acs@xemacs.org>
 
 	* setup-paths.el (paths-emacs-data-root-p): Add search for package
--- a/lisp/wid-edit.el	Fri Mar 17 14:30:45 2006 +0000
+++ b/lisp/wid-edit.el	Fri Mar 17 16:50:04 2006 +0000
@@ -324,6 +324,13 @@
       (setq tail (cdr tail)))
     (nreverse result)))
 
+(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)
+  (let ((pos (event-point event)))
+    (if (and pos (get-char-property pos 'button))
+        (widget-button-click event))))
 
 ;;; Widget text specifications.
 ;;