mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-16 13:31:27 +00:00
(vc-delete-file): Bound default-directory before calling
the backend.
This commit is contained in:
parent
6fe9826d75
commit
05fae1be0c
2 changed files with 9 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue