[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc.el
From: |
Andre Spiegel |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc.el |
Date: |
Mon, 22 Jul 2002 14:52:05 -0400 |
Index: emacs/lisp/vc.el
diff -c emacs/lisp/vc.el:1.334 emacs/lisp/vc.el:1.335
*** emacs/lisp/vc.el:1.334 Fri Jul 19 09:20:02 2002
--- emacs/lisp/vc.el Mon Jul 22 14:52:04 2002
***************
*** 6,12 ****
;; Maintainer: Andre Spiegel <address@hidden>
;; Keywords: tools
! ;; $Id: vc.el,v 1.334 2002/07/19 13:20:02 spiegel Exp $
;; This file is part of GNU Emacs.
--- 6,12 ----
;; Maintainer: Andre Spiegel <address@hidden>
;; Keywords: tools
! ;; $Id: vc.el,v 1.335 2002/07/22 18:52:04 spiegel Exp $
;; This file is part of GNU Emacs.
***************
*** 1105,1119 ****
(let ((visited (get-file-buffer file))
state version)
(when visited
;; Check relation of buffer and file, and make sure
;; user knows what he's doing. First, finding the file
;; will check whether the file on disk is newer.
! (set-buffer visited)
! ;; ignore buffer-read-only during this test
(let ((buffer-read-only (not (file-writable-p file))))
! (if vc-dired-mode
! (find-file-other-window file)
! (find-file-noselect file)))
(if (not (verify-visited-file-modtime (current-buffer)))
(if (yes-or-no-p "Replace file on disk with buffer contents? ")
(write-file (buffer-file-name))
--- 1105,1120 ----
(let ((visited (get-file-buffer file))
state version)
(when visited
+ (if vc-dired-mode
+ (switch-to-buffer-other-window visited)
+ (set-buffer visited))
;; Check relation of buffer and file, and make sure
;; user knows what he's doing. First, finding the file
;; will check whether the file on disk is newer.
! ;; Ignore buffer-read-only during this test, and
! ;; preserve find-file-literally.
(let ((buffer-read-only (not (file-writable-p file))))
! (find-file-noselect file nil find-file-literally))
(if (not (verify-visited-file-modtime (current-buffer)))
(if (yes-or-no-p "Replace file on disk with buffer contents? ")
(write-file (buffer-file-name))