]> code.delx.au - gnu-emacs/commitdiff
Doc fixes for view-mode and special major-modes
authorGlenn Morris <rgm@gnu.org>
Fri, 16 Mar 2012 01:40:20 +0000 (21:40 -0400)
committerGlenn Morris <rgm@gnu.org>
Fri, 16 Mar 2012 01:40:20 +0000 (21:40 -0400)
Ref: http://debbugs.gnu.org/10650

* doc/lispref/modes.texi (Major Mode Conventions):
Mention the strange (IMO) relationship between View mode and special modes.

* lisp/view.el (view-buffer, view-buffer-other-window)
(view-buffer-other-frame): Doc fixes re special mode-class.

doc/lispref/ChangeLog
doc/lispref/modes.texi
lisp/ChangeLog
lisp/view.el

index 3584c89d5fe5b6edf02c5d47e98e94e75cab3550..576f543a9f0e3577cd8fa54f01088f72106f28c7 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-16  Glenn Morris  <rgm@gnu.org>
+
+       * modes.texi (Major Mode Conventions): Mention the strange
+       relationship between View mode and special modes.  (Bug#10650)
+
 2012-03-11  Chong Yidong  <cyd@gnu.org>
 
        * windows.texi (Window Configurations): save-window-excursion is
index b0e9d4a3139048713ff6a075654affb420be3466..946dcb91317e8beb0ce9f90c57da1011d2b986b7 100644 (file)
@@ -525,6 +525,10 @@ mode when creating new buffers (@pxref{Auto Major Mode}), but with such
 @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
index 7d9ccc95758e8d2a1652ce2ca0aad35217359b74..35da6fc9e314986169384a87801a0273996c968b 100644 (file)
@@ -1,5 +1,8 @@
 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)
 
index 4a219971097abce0db667ecd3dd89ad02f72ed49..41cb975228881f76595a954bd71e428ee0327438 100644 (file)
@@ -309,7 +309,11 @@ this argument instead of explicitly setting `view-exit-action'.
 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)
@@ -331,7 +335,11 @@ Optional argument NOT-RETURN is ignored.
 
 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))
@@ -354,7 +362,11 @@ Optional argument NOT-RETURN is ignored.
 
 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))