+2009-07-24 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * 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.
+
2009-07-24 Glenn Morris <rgm@gnu.org>
* emacs-lisp/elint.el (elint-current-buffer, elint-defun):
(when (vc-string-prefix-p ddir file)
(if (file-directory-p file)
(vc-dir-resync-directory-files file)
- (vc-dir-update
- (list (vc-dir-recompute-file-state file ddir))
- status-buf)))))))
+ (let ((state (vc-dir-recompute-file-state file ddir)))
+ (vc-dir-update
+ (list state)
+ status-buf (eq (cadr state) 'up-to-date)))))))))
;; We didn't find any vc-dir buffers, remove the hook, it is
;; not needed.
(unless found-vc-dir-buf
(dolist (buffer (buffer-list))
(let ((fname (buffer-file-name buffer)))
(when (and fname (vc-string-prefix-p directory fname))
- (vc-resynch-buffer fname keep noquery)))))
+ (with-current-buffer buffer
+ (vc-resynch-buffer fname keep noquery))))))
(defun vc-resynch-buffer (file &optional keep noquery)
"If FILE is currently visited, resynch its buffer."