But sometimes, the major mode already has similar functionality, so I'd prefer view-mode not to be activated.
I'm wondering which modes those are, since special modes are already excluded from view-read-only. I have it enabled as well but haven't noticed view-mode becoming enabled in modes that have similar features.
To solve this problem, we can take a look at how the variable is used in the Emacs source code. By doing C-h v view-read-only RET, we can see the variable's documentation. From there, pressing s opens the elisp file where it is defined. There is no guarantee that that will be the same file where it is used. But in this case it is.
Now, with "files.el" opened, we can search for the variable in this file. And we find the following code included in the after-find-file function.
(when (and buffer-read-only view-read-only (not (eq (get major-mode 'mode-class) 'special))) (view-mode-enter))
So it appears that for view-read-only to cause view-mode to be enabled when opening a read-only file, the major-mode must not have a mode-class property of special.
This means we should be able to make exceptions to the behavior of view-read-only by setting the mode-class property of the major-mode. For example, if we don't want to use view-mode with read-only Elisp buffers, we can do:
(put 'emacs-lisp-mode 'mode-class 'special)
However, this may have other side-effects. See the major-mode conventions section of the manual (near the bottom) for more information.