[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v
From: |
Eric S. Raymond |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v |
Date: |
Wed, 07 May 2008 00:19:22 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Eric S. Raymond <esr> 08/05/07 00:19:21
Index: vc-dispatcher.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-dispatcher.el,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- vc-dispatcher.el 6 May 2008 23:56:48 -0000 1.21
+++ vc-dispatcher.el 7 May 2008 00:19:19 -0000 1.22
@@ -567,10 +567,7 @@
(when buffer
(with-current-buffer buffer
(vc-resynch-window file keep noquery)))))
- (vc-directory-resynch-file file)
- (when (memq 'vc-dir-mark-buffer-changed after-save-hook)
- (let ((buffer (get-file-buffer file)))
- (vc-dir-mark-buffer-changed file))))
+ (vc-directory-resynch-file file))
;; Command closures
@@ -850,20 +847,6 @@
(push buffer result)))))
(nreverse result)))
-(defun vc-directory-resynch-file (file)
- "Update the entries for FILE in any VC Dired buffers that list it."
- ;;FIXME This needs to be implemented so it works for vc-dir
- (let ((buffers (vc-dired-buffers-for-dir (file-name-directory file))))
- (when buffers
- (mapcar (lambda (buffer)
- (with-current-buffer buffer
- (when (dired-goto-file file)
- ;; bind vc-dired-terse-mode to nil so that
- ;; files won't vanish when they are checked in
- (let ((vc-dired-terse-mode nil))
- (dired-do-redisplay 1)))))
- buffers))))
-
;;;###autoload
(defun vc-directory (dir read-switches)
"Create a buffer in VC Dired Mode for directory DIR.
@@ -1559,9 +1542,22 @@
(setq crt (ewoc-next vc-ewoc crt)))))
result))
-(defun vc-dir-mark-buffer-changed (&optional fname)
- (let* ((file (or fname (expand-file-name buffer-file-name)))
- (found-vc-dir-buf nil))
+(defun vc-directory-resynch-file (&optional fname)
+ "Update the entries for FILE in any directory buffers that list it."
+ (let ((file (or fname (expand-file-name buffer-file-name))))
+ ;; The VC-Dired case
+ (let ((buffers (vc-dired-buffers-for-dir (file-name-directory file))))
+ (when buffers
+ (mapc (lambda (buffer)
+ (with-current-buffer buffer
+ (when (dired-goto-file file)
+ ;; bind vc-dired-terse-mode to nil so that
+ ;; files won't vanish when they are checked in
+ (let ((vc-dired-terse-mode nil))
+ (dired-do-redisplay 1)))))
+ buffers)))
+ ;; The vc-dir case
+ (let ((found-vc-dir-buf nil))
(save-excursion
(dolist (status-buf (buffer-list))
(set-buffer status-buf)
@@ -1584,7 +1580,7 @@
(vc-dir-update (list entry) status-buf))))))
;; We didn't find any vc-dir buffers, remove the hook, it is
;; not needed.
- (unless found-vc-dir-buf (remove-hook 'after-save-hook
'vc-dir-mark-buffer-changed)))))
+ (unless found-vc-dir-buf (remove-hook 'after-save-hook
'vc-directory-resynch-file))))))
(defun vc-dir-mode (client-object)
"Major mode for showing the VC status for a directory.
@@ -1619,7 +1615,7 @@
(set (make-local-variable 'vc-ewoc)
(ewoc-create (vc-client-object->file-to-info client-object)
(vc-client-object->headers client-object)))
- (add-hook 'after-save-hook 'vc-dir-mark-buffer-changed)
+ (add-hook 'after-save-hook 'vc-directory-resynch-file)
;; Make sure that if the VC status buffer is killed, the update
;; process running in the background is also killed.
(add-hook 'kill-buffer-query-functions 'vc-dir-kill-query nil t)
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, (continued)
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/05
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/05
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/05
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/05
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Glenn Morris, 2008/05/06
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/06
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/06
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/06
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/06
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/06
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v,
Eric S. Raymond <=
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Dan Nicolaescu, 2008/05/06
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/07
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/07
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/07
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/08
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Stefan Monnier, 2008/05/09
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Stefan Monnier, 2008/05/09
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Stefan Monnier, 2008/05/09
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/09
- [Emacs-diffs] Changes to emacs/lisp/vc-dispatcher.el,v, Eric S. Raymond, 2008/05/09