comparison 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
comparison
equal deleted inserted replaced
94555:e33c27238da2 94556:8d02ae7cb729
825 (error uncontrolled))))) 825 (error uncontrolled)))))
826 826
827 (defsubst mouse-movement-p (object) 827 (defsubst mouse-movement-p (object)
828 "Return non-nil if OBJECT is a mouse movement event." 828 "Return non-nil if OBJECT is a mouse movement event."
829 (eq (car-safe object) 'mouse-movement)) 829 (eq (car-safe object) 'mouse-movement))
830
831 (defun mouse-event-p (object)
832 "Return non-nil if OBJECT is a mouse click event."
833 ;; is this really correct? maybe remove mouse-movement?
834 (memq (event-basic-type object) '(mouse-1 mouse-2 mouse-3 mouse-movement)))
830 835
831 (defsubst event-start (event) 836 (defsubst event-start (event)
832 "Return the starting position of EVENT. 837 "Return the starting position of EVENT.
833 If EVENT is a mouse or key press or a mouse click, this returns the location 838 If EVENT is a mouse or key press or a mouse click, this returns the location
834 of the event. 839 of the event.