]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-delete-file): Bound default-directory before calling
authorDan Nicolaescu <dann@ics.uci.edu>
Fri, 13 Jun 2008 14:40:57 +0000 (14:40 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Fri, 13 Jun 2008 14:40:57 +0000 (14:40 +0000)
the backend.

lisp/ChangeLog
lisp/vc.el

index 3986f1763f14eb833053fbf5e3f5cc2b99164964..d4faca6f665c74532525b3059262e7489639a18a 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-13  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * vc.el (vc-delete-file): Bound default-directory before calling
+       the backend.
+
 2008-06-13  Jason Rumney  <jasonr@gnu.org>
 
         * term/w32-win.el (mouse-set-font): Remove overridden function.
index 1d53b277677cbdede460cb4d7abd08977e4e2a03..2c4a88124a9afd42fbfb5fa252e5ea6b0e84516f 100644 (file)
@@ -2484,7 +2484,10 @@ backend to NEW-BACKEND, and unregister FILE from the current backend.
       (with-current-buffer (or buf (find-file-noselect file))
        (let ((backup-inhibited nil))
          (backup-buffer))))
-    (vc-call-backend backend 'delete-file file)
+    ;; Bind `default-directory' so that the command that the backend
+    ;; runs to remove the file is invoked in the correct context.
+    (let ((default-directory (file-name-directory file)))
+      (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.