aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Spiegel1998-01-07 14:33:37 +0000
committerAndré Spiegel1998-01-07 14:33:37 +0000
commitf8791ebe79e49f11c378e5ec868a070043f0a224 (patch)
treeb4e711893612984758e93f6f21e9a2765363fa4a
parent8b877ecddf1b0f8a1b392640a72cc78d88e3da01 (diff)
downloademacs-f8791ebe79e49f11c378e5ec868a070043f0a224.tar.gz
emacs-f8791ebe79e49f11c378e5ec868a070043f0a224.zip
(vc-resynch-window): Behave properly when view-read-only is non-nil.
-rw-r--r--lisp/vc.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index a49092e79e2..a5f0295e14f 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -990,6 +990,14 @@ merge in the changes into your working copy."
990 (remove-hook 'find-file-hooks 'vc-find-file-hook) 990 (remove-hook 'find-file-hooks 'vc-find-file-hook)
991 (vc-revert-buffer1 t noquery) 991 (vc-revert-buffer1 t noquery)
992 (add-hook 'find-file-hooks 'vc-find-file-hook) 992 (add-hook 'find-file-hooks 'vc-find-file-hook)
993 (and view-read-only
994 (if (file-writable-p file)
995 (and view-mode
996 (let ((view-old-buffer-read-only nil))
997 (view-mode-exit)))
998 (and (not view-mode)
999 (not (eq (get major-mode 'mode-class) 'special))
1000 (view-mode-enter))))
993 (vc-mode-line buffer-file-name)) 1001 (vc-mode-line buffer-file-name))
994 (kill-buffer (current-buffer))))) 1002 (kill-buffer (current-buffer)))))
995 1003