From e6038ca330db4bd61969d687597498ed68e6ee92 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 18 Oct 2005 00:28:57 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 8 ++++++++ lisp/cus-edit.el | 12 +----------- lisp/wid-edit.el | 10 ++++++++++ 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ebc420983fb..3e83b17b8b6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 8f88e4d049c..696fd66543a 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4245,20 +4245,10 @@ The format is suitable for use with `easy-menu-define'." (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 --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 8335a202120..1d5cb3625f0 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -660,6 +660,16 @@ button is pressed or inactive, respectively. These are currently ignored." 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 -- 2.39.5