849 |
(define-key map "\t" 'widget-forward) |
(define-key map "\t" 'widget-forward) |
850 |
(define-key map [(shift tab)] 'widget-backward) |
(define-key map [(shift tab)] 'widget-backward) |
851 |
(define-key map [backtab] 'widget-backward) |
(define-key map [backtab] 'widget-backward) |
852 |
|
(define-key map [mouse-1] 'widget-move-and-invoke) |
853 |
(define-key map [down-mouse-2] 'widget-button-click) |
(define-key map [down-mouse-2] 'widget-button-click) |
854 |
(define-key map "\C-m" 'widget-button-press) |
(define-key map "\C-m" 'widget-button-press) |
855 |
map) |
map) |
902 |
;; backward-compatibility alias |
;; backward-compatibility alias |
903 |
(put 'widget-button-pressed-face 'face-alias 'widget-button-pressed) |
(put 'widget-button-pressed-face 'face-alias 'widget-button-pressed) |
904 |
|
|
905 |
|
(defun widget-move-and-invoke (event) |
906 |
|
"Move to where you click, and if it is an active field, invoke it." |
907 |
|
(interactive "e") |
908 |
|
(mouse-set-point event) |
909 |
|
(let ((pos (widget-event-point event))) |
910 |
|
(if (and pos (get-char-property pos 'button)) |
911 |
|
(widget-button-click event)))) |
912 |
|
|
913 |
(defun widget-button-click (event) |
(defun widget-button-click (event) |
914 |
"Invoke the button that the mouse is pointing at." |
"Invoke the button that the mouse is pointing at." |
915 |
(interactive "e") |
(interactive "e") |