# HG changeset patch # User Chong Yidong # Date 1129595337 0 # Node ID 1b475d6de39b2e6fbaada3617b963411c2270cf1 # Parent bcf724ef6a96bf73cbe552ea1a20ce3aeeafaa4b * 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. diff -r bcf724ef6a96 -r 1b475d6de39b lisp/ChangeLog --- a/lisp/ChangeLog Mon Oct 17 23:46:28 2005 +0000 +++ b/lisp/ChangeLog Tue Oct 18 00:28:57 2005 +0000 @@ -1,3 +1,11 @@ +2005-10-17 Chong Yidong + + * 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. + 2005-10-17 Bill Wohler Moved all remaining images from lisp/toolbar to etc/images, moved diff -r bcf724ef6a96 -r 1b475d6de39b lisp/cus-edit.el --- a/lisp/cus-edit.el Mon Oct 17 23:46:28 2005 +0000 +++ b/lisp/cus-edit.el Tue Oct 18 00:28:57 2005 +0000 @@ -4245,20 +4245,10 @@ (define-key map "u" 'Custom-goto-parent) (define-key map "n" 'widget-forward) (define-key map "p" 'widget-backward) - (define-key map [mouse-1] 'Custom-move-and-invoke) + (define-key map [mouse-1] 'widget-move-and-invoke) map) "Keymap for `custom-mode'.") -(defun Custom-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))))) - (easy-menu-define Custom-mode-menu custom-mode-map "Menu used in customization buffers." diff -r bcf724ef6a96 -r 1b475d6de39b lisp/wid-edit.el --- 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