Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
66170:bcf724ef6a96 | 66171:1b475d6de39b |
---|---|
658 (insert-image image | 658 (insert-image image |
659 (propertize | 659 (propertize |
660 tag 'mouse-face widget-button-pressed-face))) | 660 tag 'mouse-face widget-button-pressed-face))) |
661 (insert tag))) | 661 (insert tag))) |
662 | 662 |
663 (defun widget-move-and-invoke (event) | |
664 "Move to where you click, and if it is an active field, invoke it." | |
665 (interactive "e") | |
666 (mouse-set-point event) | |
667 (if (widget-event-point event) | |
668 (let* ((pos (widget-event-point event)) | |
669 (button (get-char-property pos 'button))) | |
670 (if button | |
671 (widget-button-click event))))) | |
672 | |
663 ;;; Buttons. | 673 ;;; Buttons. |
664 | 674 |
665 (defgroup widget-button nil | 675 (defgroup widget-button nil |
666 "The look of various kinds of buttons." | 676 "The look of various kinds of buttons." |
667 :group 'widgets) | 677 :group 'widgets) |