From 6cdc3bc9f124b88bc791694c1d736d681fb823e0 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 2 May 2008 07:47:18 +0000 Subject: [PATCH] More preparation for removing dired. --- lisp/ChangeLog | 3 +++ lisp/vc-hooks.el | 4 ++-- lisp/vc.el | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c53e77bddca..5c0afd56b9e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -7,6 +7,9 @@ * vc-hooks.el (vc-toggle-read-only): Throw an error when a user tries this on a version-controlled buffer. it will do useless or actively bad things on any version control system newer than RCS. + * vc-hooks.el (vc-dired-resynch-file), + vc.el (vc-dired-resynch-file): Change name of primitive to + vc-directory-resynch-file, preoaring to remove dired. 2008-05-02 Dan Nicolaescu diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 5b513c46c47..76fe6053f19 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -751,7 +751,7 @@ Before doing that, check if there are any old backups and get rid of them." (vc-call make-version-backups-p file) (vc-make-version-backup file))))) -(declare-function vc-dired-resynch-file "vc" (file)) +(declare-function vc-directory-resynch-file "vc" (file)) (defun vc-after-save () "Function to be called by `basic-save-buffer' (in files.el)." @@ -775,7 +775,7 @@ Before doing that, check if there are any old backups and get rid of them." (when (featurep 'vc) ;; If VC is not loaded, then there can't be ;; any VC Dired buffer to synchronize. - (vc-dired-resynch-file file))))) + (vc-directory-resynch-file file))))) (defvar vc-menu-entry '(menu-item "Version Control" vc-menu-map diff --git a/lisp/vc.el b/lisp/vc.el index ae575985f1a..f1286aece5e 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1896,7 +1896,7 @@ rather than user editing!" (when buffer (with-current-buffer buffer (vc-resynch-window file keep noquery))))) - (vc-dired-resynch-file file) + (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)))) @@ -2726,8 +2726,9 @@ Called by dired after any portion of a vc-dired buffer has been read in." (push buffer result))))) (nreverse result))) -(defun vc-dired-resynch-file (file) +(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) -- 2.39.5