Commit 05fae1be authored by Dan Nicolaescu's avatar Dan Nicolaescu
Browse files

(vc-delete-file): Bound default-directory before calling

the backend.
parent 6fe9826d
2008-06-13 Dan Nicolaescu <>
* vc.el (vc-delete-file): Bound default-directory before calling
the backend.
2008-06-13 Jason Rumney <>
* term/w32-win.el (mouse-set-font): Remove overridden function.
......@@ -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))
(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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment