diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 9029b2ab4e8..63de0ae0c1b 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2757,12 +2757,7 @@ Unlike `vc-find-revision-save', doesn't save the buffer to the file." ;; to not ignore 'enable-local-variables' when nil. (normal-mode (not enable-local-variables))) (set-buffer-modified-p nil) - (setq buffer-read-only t) - (run-hooks 'read-only-mode-hook) - (when (and view-read-only - (not view-mode) - (not (eq (get major-mode 'mode-class) 'special))) - (view-mode-enter)) + (read-only-mode 1) (setq failed nil)) (when (and failed (unless buffer (get-file-buffer filename))) (with-current-buffer (get-file-buffer filename)