Function: vc-dir-at-event
vc-dir-at-event is a macro defined in vc-dir.el.gz.
Signature
(vc-dir-at-event EVENT &rest BODY)
Documentation
Evaluate BODY with point located at event-start of EVENT.
If BODY uses EVENT, it should be a variable,
otherwise it will be evaluated twice.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-dir.el.gz
(defmacro vc-dir-at-event (event &rest body)
"Evaluate BODY with point located at `event-start' of EVENT.
If BODY uses EVENT, it should be a variable,
otherwise it will be evaluated twice."
(let ((posn (make-symbol "vc-dir-at-event-posn")))
`(save-excursion
(unless (equal ,event '(tool-bar))
(let ((,posn (event-start ,event)))
(set-buffer (window-buffer (posn-window ,posn)))
(goto-char (posn-point ,posn))))
,@body)))