]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-at-event): Handle (tool-bar) events. Fix bug#1585.
authorSam Steingold <sds@gnu.org>
Thu, 18 Dec 2008 03:29:02 +0000 (03:29 +0000)
committerSam Steingold <sds@gnu.org>
Thu, 18 Dec 2008 03:29:02 +0000 (03:29 +0000)
lisp/ChangeLog
lisp/vc-dir.el

index 87f319c397fcd293f1dd37d61177c5226dec8be6..37d02b9ef566d6a26b34dffe044382c5da965262 100644 (file)
@@ -1,3 +1,7 @@
+2008-12-18  Sam Steingold  <sds@gnu.org>
+
+       * vc-dir.el (vc-at-event): Handle (tool-bar) events. Fix bug#1585.
+
 2008-12-18  Juri Linkov  <juri@jurta.org>
 
        * isearch.el (minibuffer-local-isearch-map): Unbind "C-w" from
index 63f239ead3293d56ae94b5d05feffa882231d290..aaa5b1b58c1ee225f59ec4698949b2f62a8bf9f5 100644 (file)
@@ -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."