From: Sam Steingold Date: Thu, 18 Dec 2008 03:29:02 +0000 (+0000) Subject: (vc-at-event): Handle (tool-bar) events. Fix bug#1585. X-Git-Tag: emacs-pretest-23.0.90~1049 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5da5a66f02081ebcfda7e77a9ee75df2c21904b6;p=emacs.git (vc-at-event): Handle (tool-bar) events. Fix bug#1585. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 87f319c397f..37d02b9ef56 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-12-18 Sam Steingold + + * vc-dir.el (vc-at-event): Handle (tool-bar) events. Fix bug#1585. + 2008-12-18 Juri Linkov * isearch.el (minibuffer-local-isearch-map): Unbind "C-w" from diff --git a/lisp/vc-dir.el b/lisp/vc-dir.el index 63f239ead32..aaa5b1b58c1 100644 --- a/lisp/vc-dir.el +++ b/lisp/vc-dir.el @@ -280,11 +280,12 @@ See `run-hooks'." If `body' uses `event', it should be a variable, otherwise it will be evaluated twice." (let ((posn (make-symbol "vc-at-event-posn"))) - `(let ((,posn (event-start ,event))) - (save-excursion - (set-buffer (window-buffer (posn-window ,posn))) - (goto-char (posn-point ,posn)) - ,@body)))) + `(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))) (defun vc-dir-menu (e) "Popup the VC dir menu."