@code{special} modes, Fundamental mode is used instead. Modes such as
Dired, Rmail, and Buffer List use this feature.
+The function @code{view-buffer} does not enable View mode in buffers
+whose mode-class is special, because such modes usually provide their
+own View-like bindings.
+
The @code{define-derived-mode} macro automatically marks the derived
mode as special if the parent mode is special. Special mode is a
convenient parent for such modes to inherit from; @xref{Basic Major
2012-03-16 Glenn Morris <rgm@gnu.org>
+ * view.el (view-buffer, view-buffer-other-window)
+ (view-buffer-other-frame): Doc fixes re special mode-class.
+
* subr.el (eval-after-load): If named feature is provided not from
a file, run after-load forms. (Bug#10946)
Do not set EXIT-ACTION to `kill-buffer' when BUFFER visits a
file: Users may suspend viewing in order to modify the buffer.
Exiting View mode will then discard the user's edits. Setting
-EXIT-ACTION to `kill-buffer-if-not-modified' avoids this."
+EXIT-ACTION to `kill-buffer-if-not-modified' avoids this.
+
+This function does not enable View mode if the buffer's major-mode
+has a `special' mode-class, because such modes usually have their
+own View-like bindings."
(interactive "bView buffer: ")
(switch-to-buffer buffer)
(if (eq (get major-mode 'mode-class) 'special)
Optional argument EXIT-ACTION is either nil or a function with buffer as
argument. This function is called when finished viewing buffer. Use
-this argument instead of explicitly setting `view-exit-action'."
+this argument instead of explicitly setting `view-exit-action'.
+
+This function does not enable View mode if the buffer's major-mode
+has a `special' mode-class, because such modes usually have their
+own View-like bindings."
(interactive "bIn other window view buffer:\nP")
(let ((pop-up-windows t))
(pop-to-buffer buffer t))
Optional argument EXIT-ACTION is either nil or a function with buffer as
argument. This function is called when finished viewing buffer. Use
-this argument instead of explicitly setting `view-exit-action'."
+this argument instead of explicitly setting `view-exit-action'.
+
+This function does not enable View mode if the buffer's major-mode
+has a `special' mode-class, because such modes usually have their
+own View-like bindings."
(interactive "bView buffer in other frame: \nP")
(let ((pop-up-frames t))
(pop-to-buffer buffer t))