aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2008-06-13 14:40:57 +0000
committerDan Nicolaescu2008-06-13 14:40:57 +0000
commit05fae1be0c58e6c8b79de4ef82dae686c2f3d406 (patch)
tree83681ee9abbfe504b819a5e04944d4a84c29982d
parent6fe9826d7586a4e6dedb0c567553f70c92161da3 (diff)
downloademacs-05fae1be0c58e6c8b79de4ef82dae686c2f3d406.tar.gz
emacs-05fae1be0c58e6c8b79de4ef82dae686c2f3d406.zip
(vc-delete-file): Bound default-directory before calling
the backend.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc.el5
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3986f1763f1..d4faca6f665 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12008-06-13 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * vc.el (vc-delete-file): Bound default-directory before calling
4 the backend.
5
12008-06-13 Jason Rumney <jasonr@gnu.org> 62008-06-13 Jason Rumney <jasonr@gnu.org>
2 7
3 * term/w32-win.el (mouse-set-font): Remove overridden function. 8 * term/w32-win.el (mouse-set-font): Remove overridden function.
diff --git a/lisp/vc.el b/lisp/vc.el
index 1d53b277677..2c4a88124a9 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -2484,7 +2484,10 @@ backend to NEW-BACKEND, and unregister FILE from the current backend.
2484 (with-current-buffer (or buf (find-file-noselect file)) 2484 (with-current-buffer (or buf (find-file-noselect file))
2485 (let ((backup-inhibited nil)) 2485 (let ((backup-inhibited nil))
2486 (backup-buffer)))) 2486 (backup-buffer))))
2487 (vc-call-backend backend 'delete-file file) 2487 ;; Bind `default-directory' so that the command that the backend
2488 ;; runs to remove the file is invoked in the correct context.
2489 (let ((default-directory (file-name-directory file)))
2490 (vc-call-backend backend 'delete-file file))
2488 ;; If the backend hasn't deleted the file itself, let's do it for him. 2491 ;; If the backend hasn't deleted the file itself, let's do it for him.
2489 (when (file-exists-p file) (delete-file file)) 2492 (when (file-exists-p file) (delete-file file))
2490 ;; Forget what VC knew about the file. 2493 ;; Forget what VC knew about the file.