emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/vc.el,v
Date: Fri, 23 May 2008 20:59:53 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/05/23 20:59:51

Index: vc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc.el,v
retrieving revision 1.672
retrieving revision 1.673
diff -u -b -r1.672 -r1.673
--- vc.el       18 May 2008 07:53:07 -0000      1.672
+++ vc.el       23 May 2008 20:59:51 -0000      1.673
@@ -547,6 +547,8 @@
 
 ;;; Todo:
 
+;; - Add key-binding for vc-delete-file.
+
 ;;;; New Primitives:
 ;;
 ;; - deal with push/pull operations.
@@ -587,7 +589,7 @@
 ;;;; Internal cleanups:
 ;;
 ;; - backends that care about vc-stay-local should try to take it into
-;;   account for vc-dir.  Is this likely to be useful???
+;;   account for vc-dir.  Is this likely to be useful???  YES!
 ;;
 ;; - vc-expand-dirs should take a backend parameter and only look for
 ;;   files managed by that backend.
@@ -2437,17 +2439,16 @@
                 (not (file-exists-p file)))
       (with-current-buffer (or buf (find-file-noselect file))
        (let ((backup-inhibited nil))
-         (backup-buffer))
-       ;; If we didn't have a buffer visiting the file before this
-       ;; command, kill the buffer created by the above
-       ;; `find-file-noselect' call.
-       (unless buf (kill-buffer (current-buffer)))))
+         (backup-buffer))))
     (vc-call-backend backend 'delete-file file)
     ;; If the backend hasn't deleted the file itself, let's do it for him.
     (when (file-exists-p file) (delete-file file))
     ;; Forget what VC knew about the file.
     (vc-file-clearprops file)
-    (vc-resynch-buffer file buf t)))
+    ;; Since we've deleted the file and we've made sure the buffer had no
+    ;; unsaved changes, we can kill the buffer.  Much easier than trying to
+    ;; properly refresh its VC state.
+    (when buf (kill-buffer buf))))
 
 ;;;###autoload
 (defun vc-rename-file (old new)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]