Mercurial > emacs
diff lisp/subr.el @ 94556:8d02ae7cb729
* vc.el (vc-dir-mode-map): Enable mouse bindings.
(vc-at-event): New macro: run the body at the even location.
(vc-dir-menu, vc-dir-toggle-mark): Use it.
(vc-dir-mark-file, vc-dir-unmark-file): Move only on non-mouse events.
* subr.d (mouse-event-p): Check if the even is mouse-related.
author | Sam Steingold <sds@gnu.org> |
---|---|
date | Fri, 02 May 2008 14:37:39 +0000 |
parents | 6d85304f4f12 |
children | ee5932bf781d |
line wrap: on
line diff
--- a/lisp/subr.el Fri May 02 12:43:30 2008 +0000 +++ b/lisp/subr.el Fri May 02 14:37:39 2008 +0000 @@ -828,6 +828,11 @@ "Return non-nil if OBJECT is a mouse movement event." (eq (car-safe object) 'mouse-movement)) +(defun mouse-event-p (object) + "Return non-nil if OBJECT is a mouse click event." + ;; is this really correct? maybe remove mouse-movement? + (memq (event-basic-type object) '(mouse-1 mouse-2 mouse-3 mouse-movement))) + (defsubst event-start (event) "Return the starting position of EVENT. If EVENT is a mouse or key press or a mouse click, this returns the location