Subject: view-mode inconsistencies wrt special mode-class

From: Glenn Morris <[email-masked]>
Date: Mon, 30 Jan 2012 04:05:16 -0500

Package: emacs
Version: 24.0.93
Severity: minor

emacs -Q
M-x view-file RET /path/to/old/rmail/BABYL/file RET
-> "Not using View mode because the major mode is special"

but:
emacs -Q
M-x view-file-other-window RET /path/to/old/rmail/BABYL/file/RET
-> buffer opened in view mode.

This is a silly inconsistency. The test for special mode class was
already generalized (bug#5513) from view-file to view-buffer, but none
of the other view-mode commands (view-file-other-window,
view-file-other-frame, view-buffer-other-window,
view-buffer-other-frame) use view-buffer, so this doesn't affect them.

The check should probably be moved to view-mode-enter. This is used in a
handful of places outside view.el, so maybe an optional argument to
control the check will be needed.

When this is done, view-mode will treat special mode class consistently,
so it can be documented in the manual (the relation between view-mode
and special modes does not seem to documented at present). See the Emacs
24 etc/NEWS entry for view buffer.