aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2009-07-24 05:41:17 +0000
committerDan Nicolaescu2009-07-24 05:41:17 +0000
commitba83b7b62f12b0305585261f7b08bf1a699aa86b (patch)
treeddc634cd056561c48a0f49be9d552da41f4574a6
parent1d2faf9803bcd171fdb1d305b1b8f266c445b9dd (diff)
downloademacs-ba83b7b62f12b0305585261f7b08bf1a699aa86b.tar.gz
emacs-ba83b7b62f12b0305585261f7b08bf1a699aa86b.zip
* vc-dispatcher.el (vc-resynch-buffers-in-directory): Make sure
the buffer we try to sync is current when calling vc-resynch-buffer. * vc-dir.el (vc-dir-resynch-file): Make sure vc-dir-update does not show up to date files.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/vc-dir.el7
-rw-r--r--lisp/vc-dispatcher.el3
3 files changed, 15 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6e1b5ef2819..b6e647f9097 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12009-07-24 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * vc-dispatcher.el (vc-resynch-buffers-in-directory): Make sure
4 the buffer we try to sync is current when calling
5 vc-resynch-buffer.
6
7 * vc-dir.el (vc-dir-resynch-file): Make sure vc-dir-update does
8 not show up to date files.
9
12009-07-24 Glenn Morris <rgm@gnu.org> 102009-07-24 Glenn Morris <rgm@gnu.org>
2 11
3 * emacs-lisp/elint.el (elint-current-buffer, elint-defun): 12 * emacs-lisp/elint.el (elint-current-buffer, elint-defun):
diff --git a/lisp/vc-dir.el b/lisp/vc-dir.el
index 4316caeade1..2c1138f858f 100644
--- a/lisp/vc-dir.el
+++ b/lisp/vc-dir.el
@@ -866,9 +866,10 @@ If it is a file, return the corresponding cons for the file itself."
866 (when (vc-string-prefix-p ddir file) 866 (when (vc-string-prefix-p ddir file)
867 (if (file-directory-p file) 867 (if (file-directory-p file)
868 (vc-dir-resync-directory-files file) 868 (vc-dir-resync-directory-files file)
869 (vc-dir-update 869 (let ((state (vc-dir-recompute-file-state file ddir)))
870 (list (vc-dir-recompute-file-state file ddir)) 870 (vc-dir-update
871 status-buf))))))) 871 (list state)
872 status-buf (eq (cadr state) 'up-to-date)))))))))
872 ;; We didn't find any vc-dir buffers, remove the hook, it is 873 ;; We didn't find any vc-dir buffers, remove the hook, it is
873 ;; not needed. 874 ;; not needed.
874 (unless found-vc-dir-buf 875 (unless found-vc-dir-buf
diff --git a/lisp/vc-dispatcher.el b/lisp/vc-dispatcher.el
index c51a4896b76..f03f16ede98 100644
--- a/lisp/vc-dispatcher.el
+++ b/lisp/vc-dispatcher.el
@@ -484,7 +484,8 @@ editing!"
484 (dolist (buffer (buffer-list)) 484 (dolist (buffer (buffer-list))
485 (let ((fname (buffer-file-name buffer))) 485 (let ((fname (buffer-file-name buffer)))
486 (when (and fname (vc-string-prefix-p directory fname)) 486 (when (and fname (vc-string-prefix-p directory fname))
487 (vc-resynch-buffer fname keep noquery))))) 487 (with-current-buffer buffer
488 (vc-resynch-buffer fname keep noquery))))))
488 489
489(defun vc-resynch-buffer (file &optional keep noquery) 490(defun vc-resynch-buffer (file &optional keep noquery)
490 "If FILE is currently visited, resynch its buffer." 491 "If FILE is currently visited, resynch its buffer."