Mercurial > emacs
changeset 20602:e8566ea47491
(vc-resynch-window): Behave properly when view-read-only is non-nil.
author | André Spiegel <spiegel@gnu.org> |
---|---|
date | Wed, 07 Jan 1998 14:33:37 +0000 |
parents | 97249de6bbfa |
children | 24dda0afd915 |
files | lisp/vc.el |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/vc.el Wed Jan 07 12:39:59 1998 +0000 +++ b/lisp/vc.el Wed Jan 07 14:33:37 1998 +0000 @@ -990,6 +990,14 @@ (remove-hook 'find-file-hooks 'vc-find-file-hook) (vc-revert-buffer1 t noquery) (add-hook 'find-file-hooks 'vc-find-file-hook) + (and view-read-only + (if (file-writable-p file) + (and view-mode + (let ((view-old-buffer-read-only nil)) + (view-mode-exit))) + (and (not view-mode) + (not (eq (get major-mode 'mode-class) 'special)) + (view-mode-enter)))) (vc-mode-line buffer-file-name)) (kill-buffer (current-buffer)))))