[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc.el,v
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc.el,v |
Date: |
Sun, 23 Mar 2008 21:05:35 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 08/03/23 21:05:34
Index: vc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc.el,v
retrieving revision 1.555
retrieving revision 1.556
diff -u -b -r1.555 -r1.556
--- vc.el 23 Mar 2008 18:12:17 -0000 1.555
+++ vc.el 23 Mar 2008 21:05:31 -0000 1.556
@@ -1789,8 +1789,7 @@
(vc-dired-resynch-file file)
(when (memq 'vc-status-mark-buffer-changed after-save-hook)
(let ((buffer (get-file-buffer file)))
- (with-current-buffer buffer
- (when buffer (vc-status-mark-buffer-changed))))))
+ (vc-status-mark-buffer-changed file))))
(defun vc-start-entry (files rev comment initial-contents msg action &optional
after-hook)
@@ -3154,8 +3153,8 @@
vc-status
(lambda (crt) (not (eq (vc-status-fileinfo->state crt) 'up-to-date)))))
-(defun vc-status-mark-buffer-changed ()
- (let* ((file (expand-file-name buffer-file-name))
+(defun vc-status-mark-buffer-changed (&optional fname)
+ (let* ((file (or fname (expand-file-name buffer-file-name)))
(state (and (vc-backend file) (vc-state file)))
(found-vc-status-buf nil))
(save-excursion
@@ -3529,6 +3528,7 @@
(defun vc-delete-file (file)
"Delete file and mark it as such in the version control system."
(interactive "fVC delete file: ")
+ (setq file (expand-file-name file))
(let ((buf (get-file-buffer file))
(backend (vc-backend file)))
(unless backend
@@ -3544,10 +3544,17 @@
(unless (or (file-directory-p file) (null make-backup-files))
(with-current-buffer (or buf (find-file-noselect file))
(let ((backup-inhibited nil))
- (backup-buffer))))
+ (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)))))
(vc-call delete-file file)
;; If the backend hasn't deleted the file itself, let's do it for him.
- (if (file-exists-p file) (delete-file file))))
+ (if (file-exists-p file) (delete-file file))
+ ;; Forget what VC knew about the file.
+ (vc-file-clearprops file)
+ (vc-resynch-buffer file buf t)))
;;;###autoload
(defun vc-rename-file (old new)
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Jan Djärv, 2008/03/06
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Jan Djärv, 2008/03/07
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Glenn Morris, 2008/03/10
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/17
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2008/03/18
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/20
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/21
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2008/03/21
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/22
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/23
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v,
Dan Nicolaescu <=
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/24
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2008/03/26
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/27
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/28
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/28
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/28
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/28
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/28
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/28
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2008/03/28