/[emacs]/emacs/lisp/wid-edit.el
ViewVC logotype

Diff of /emacs/lisp/wid-edit.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.149 by jet, Sun Oct 16 09:31:47 2005 UTC revision 1.150 by cyd, Mon Oct 17 23:39:24 2005 UTC
# Line 849  button end points." Line 849  button end points."
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)
# Line 901  Recommended as a parent keymap for modes Line 902  Recommended as a parent keymap for modes
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")

Legend:
Removed from v.1.149  
changed lines
  Added in v.1.150

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26