Mercurial > emacs
diff lisp/wid-edit.el @ 90199:bb71c6cf2009
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-67
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 447-458)
- Update from CVS
- Update from CVS: lisp/subr.el (add-to-ordered-list): Doc fix.
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 83-85)
- Merge from emacs--cvs-trunk--0
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 30 Jun 2005 00:31:46 +0000 |
parents | a1b34dec1104 73e0fc286df5 |
children | f9a65d7ebd29 |
line wrap: on
line diff
--- a/lisp/wid-edit.el Fri Jun 24 02:09:01 2005 +0000 +++ b/lisp/wid-edit.el Thu Jun 30 00:31:46 2005 +0000 @@ -967,28 +967,28 @@ (recenter)) ) - (let ((up t) command) - ;; Mouse click not on a widget button. Find the global - ;; command to run, and check whether it is bound to an - ;; up event. - (mouse-set-point event) - (if (memq (event-basic-type event) '(mouse-1 down-mouse-1)) - (cond ((setq command ;down event - (lookup-key widget-global-map [down-mouse-1])) - (setq up nil)) - ((setq command ;up event - (lookup-key widget-global-map [mouse-1])))) + (let ((up t) command) + ;; Mouse click not on a widget button. Find the global + ;; command to run, and check whether it is bound to an + ;; up event. + (mouse-set-point event) + (if (memq (event-basic-type event) '(mouse-1 down-mouse-1)) (cond ((setq command ;down event - (lookup-key widget-global-map [down-mouse-2])) + (lookup-key widget-global-map [down-mouse-1])) (setq up nil)) ((setq command ;up event - (lookup-key widget-global-map [mouse-2]))))) - (when up - ;; Don't execute up events twice. - (while (not (widget-button-release-event-p event)) - (setq event (read-event)))) - (when command - (call-interactively command))))) + (lookup-key widget-global-map [mouse-1])))) + (cond ((setq command ;down event + (lookup-key widget-global-map [down-mouse-2])) + (setq up nil)) + ((setq command ;up event + (lookup-key widget-global-map [mouse-2]))))) + (when up + ;; Don't execute up events twice. + (while (not (widget-button-release-event-p event)) + (setq event (read-event)))) + (when command + (call-interactively command))))) (message "You clicked somewhere weird."))) (defun widget-button-press (pos &optional event)