diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2005-10-18 00:28:57 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2005-10-18 00:28:57 +0000 |
commit | e6038ca330db4bd61969d687597498ed68e6ee92 (patch) | |
tree | 39c1deb24122634aedae9f2a9c3a45b029fba549 /lisp/wid-edit.el | |
parent | a008c8f4fc678112e3a0a3588e71f121c2837938 (diff) | |
download | emacs-e6038ca330db4bd61969d687597498ed68e6ee92.tar.gz |
* 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.
Diffstat (limited to 'lisp/wid-edit.el')
-rw-r--r-- | lisp/wid-edit.el | 10 |
1 files changed, 10 insertions, 0 deletions
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 |