aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Rogers2011-07-09 21:42:39 -0400
committerChong Yidong2011-07-09 21:42:39 -0400
commit455e4fa13a50cfd3ad0ca765f1aca3e3d30cca6a (patch)
tree7d539ad21c06dba1639b92d56088b7486d370441
parent8e0bc3e91a47c111b12915c16a2901181295d0bc (diff)
downloademacs-455e4fa13a50cfd3ad0ca765f1aca3e3d30cca6a.tar.gz
emacs-455e4fa13a50cfd3ad0ca765f1aca3e3d30cca6a.zip
* vc/vc.el (vc-diff-internal): Fix race condition (Bug#1256).
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/vc/vc.el7
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f5a6c1eeaf4..40f96b05637 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12011-07-10 Bob Rogers <rogers@rgrjr.dyndns.org>
2
3 * vc/vc.el (vc-diff-internal): Fix race condition (Bug#1256).
4
12011-07-10 Chong Yidong <cyd@stupidchicken.com> 52011-07-10 Chong Yidong <cyd@stupidchicken.com>
2 6
3 * window.el (display-buffer): Fix arguments to 7 * window.el (display-buffer): Fix arguments to
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index e3f3c153043..796311f8f66 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1605,10 +1605,13 @@ Return t if the buffer had changes, nil otherwise."
1605 ;; bindings are nicer for read only buffers. pcl-cvs does the 1605 ;; bindings are nicer for read only buffers. pcl-cvs does the
1606 ;; same thing. 1606 ;; same thing.
1607 (setq buffer-read-only t) 1607 (setq buffer-read-only t)
1608 (vc-exec-after `(vc-diff-finish ,(current-buffer) ',(when verbose
1609 messages)))
1610 ;; Display the buffer, but at the end because it can change point. 1608 ;; Display the buffer, but at the end because it can change point.
1611 (pop-to-buffer (current-buffer)) 1609 (pop-to-buffer (current-buffer))
1610 ;; The diff process may finish early, so call `vc-diff-finish'
1611 ;; after `pop-to-buffer'; the former assumes the diff buffer is
1612 ;; shown in some window.
1613 (vc-exec-after `(vc-diff-finish ,(current-buffer)
1614 ',(when verbose messages)))
1612 ;; In the async case, we return t even if there are no differences 1615 ;; In the async case, we return t even if there are no differences
1613 ;; because we don't know that yet. 1616 ;; because we don't know that yet.
1614 t))) 1617 t)))