* lisp/vc/vc.el (vc-find-revision-no-save): After setting
buffer-read-only to non-nil, also run read-only-mode-hook,
and if view-read-only is non-nil, call view-mode-enter.
(cherry picked from commit
215fc3a354c36b2294b3dd45e72555bb4b4cb364)
(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))
(setq failed nil))
(when (and failed (unless buffer (get-file-buffer filename)))
(with-current-buffer (get-file-buffer filename)