# HG changeset patch # User Stefan Monnier # Date 988850167 0 # Node ID 94c0503d3f2db04015ef6b2b8b5bf53486a429d3 # Parent b54a861e38de32fb5893ac1a272bc44fd5a7c12f (vc-next-action-on-file): Only force buffer+file to writable if both the buffer and the file are read-only. diff -r b54a861e38de -r 94c0503d3f2d lisp/vc.el --- a/lisp/vc.el Wed May 02 13:41:46 2001 +0000 +++ b/lisp/vc.el Thu May 03 00:36:07 2001 +0000 @@ -5,7 +5,7 @@ ;; Author: FSF (see below for full credits) ;; Maintainer: Andre Spiegel -;; $Id: vc.el,v 1.297 2001/02/26 13:45:06 spiegel Exp $ +;; $Id: vc.el,v 1.298 2001/03/10 10:44:35 spiegel Exp $ ;; This file is part of GNU Emacs. @@ -1096,7 +1096,8 @@ (message "%s is up-to-date" file)))) ;; Abnormal: edited but read-only - ((and visited (eq state 'edited) buffer-read-only) + ((and visited (eq state 'edited) + buffer-read-only (not (file-writable-p file))) ;; Make the file+buffer read-write. If the user really wanted to ;; commit, he'll get a chance to do that next time around, anyway. (message "File is edited but read-only; making it writable") @@ -2356,10 +2357,9 @@ (setq update (and (eq result 'visited) update)) (vc-file-tree-walk dir - (lambda (f) (and - (vc-error-occurred - (vc-call checkout f nil name) - (if update (vc-resynch-buffer f t t)))))))))) + (lambda (f) (vc-error-occurred + (vc-call checkout f nil name) + (if update (vc-resynch-buffer f t t))))))))) ;; Miscellaneous other entry points