]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-resynch-window): Behave properly when view-read-only is non-nil.
authorAndré Spiegel <spiegel@gnu.org>
Wed, 7 Jan 1998 14:33:37 +0000 (14:33 +0000)
committerAndré Spiegel <spiegel@gnu.org>
Wed, 7 Jan 1998 14:33:37 +0000 (14:33 +0000)
lisp/vc.el

index a49092e79e2e5329cd6416904404bbaabf3572d4..a5f0295e14fa317c6484420866404b9e6000c956 100644 (file)
@@ -990,6 +990,14 @@ merge in the changes into your working copy."
             (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)))))