aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-03-15 21:40:20 -0400
committerGlenn Morris2012-03-15 21:40:20 -0400
commitda986230818288ce7f24d6803a0acf78c06ad656 (patch)
treeed0f931613ee1450a8da799cfc17caa3c43e6fa8
parent0835f01e98aa01800565e727ff63a29099b0a0c0 (diff)
downloademacs-da986230818288ce7f24d6803a0acf78c06ad656.tar.gz
emacs-da986230818288ce7f24d6803a0acf78c06ad656.zip
Doc fixes for view-mode and special major-modes
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.
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/modes.texi4
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/view.el18
4 files changed, 27 insertions, 3 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 3584c89d5fe..576f543a9f0 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12012-03-16 Glenn Morris <rgm@gnu.org>
2
3 * modes.texi (Major Mode Conventions): Mention the strange
4 relationship between View mode and special modes. (Bug#10650)
5
12012-03-11 Chong Yidong <cyd@gnu.org> 62012-03-11 Chong Yidong <cyd@gnu.org>
2 7
3 * windows.texi (Window Configurations): save-window-excursion is 8 * windows.texi (Window Configurations): save-window-excursion is
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index b0e9d4a3139..946dcb91317 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -525,6 +525,10 @@ mode when creating new buffers (@pxref{Auto Major Mode}), but with such
525@code{special} modes, Fundamental mode is used instead. Modes such as 525@code{special} modes, Fundamental mode is used instead. Modes such as
526Dired, Rmail, and Buffer List use this feature. 526Dired, Rmail, and Buffer List use this feature.
527 527
528The function @code{view-buffer} does not enable View mode in buffers
529whose mode-class is special, because such modes usually provide their
530own View-like bindings.
531
528The @code{define-derived-mode} macro automatically marks the derived 532The @code{define-derived-mode} macro automatically marks the derived
529mode as special if the parent mode is special. Special mode is a 533mode as special if the parent mode is special. Special mode is a
530convenient parent for such modes to inherit from; @xref{Basic Major 534convenient parent for such modes to inherit from; @xref{Basic Major
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7d9ccc95758..35da6fc9e31 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12012-03-16 Glenn Morris <rgm@gnu.org> 12012-03-16 Glenn Morris <rgm@gnu.org>
2 2
3 * view.el (view-buffer, view-buffer-other-window)
4 (view-buffer-other-frame): Doc fixes re special mode-class.
5
3 * subr.el (eval-after-load): If named feature is provided not from 6 * subr.el (eval-after-load): If named feature is provided not from
4 a file, run after-load forms. (Bug#10946) 7 a file, run after-load forms. (Bug#10946)
5 8
diff --git a/lisp/view.el b/lisp/view.el
index 4a219971097..41cb9752288 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -309,7 +309,11 @@ this argument instead of explicitly setting `view-exit-action'.
309Do not set EXIT-ACTION to `kill-buffer' when BUFFER visits a 309Do not set EXIT-ACTION to `kill-buffer' when BUFFER visits a
310file: Users may suspend viewing in order to modify the buffer. 310file: Users may suspend viewing in order to modify the buffer.
311Exiting View mode will then discard the user's edits. Setting 311Exiting View mode will then discard the user's edits. Setting
312EXIT-ACTION to `kill-buffer-if-not-modified' avoids this." 312EXIT-ACTION to `kill-buffer-if-not-modified' avoids this.
313
314This function does not enable View mode if the buffer's major-mode
315has a `special' mode-class, because such modes usually have their
316own View-like bindings."
313 (interactive "bView buffer: ") 317 (interactive "bView buffer: ")
314 (switch-to-buffer buffer) 318 (switch-to-buffer buffer)
315 (if (eq (get major-mode 'mode-class) 'special) 319 (if (eq (get major-mode 'mode-class) 'special)
@@ -331,7 +335,11 @@ Optional argument NOT-RETURN is ignored.
331 335
332Optional argument EXIT-ACTION is either nil or a function with buffer as 336Optional argument EXIT-ACTION is either nil or a function with buffer as
333argument. This function is called when finished viewing buffer. Use 337argument. This function is called when finished viewing buffer. Use
334this argument instead of explicitly setting `view-exit-action'." 338this argument instead of explicitly setting `view-exit-action'.
339
340This function does not enable View mode if the buffer's major-mode
341has a `special' mode-class, because such modes usually have their
342own View-like bindings."
335 (interactive "bIn other window view buffer:\nP") 343 (interactive "bIn other window view buffer:\nP")
336 (let ((pop-up-windows t)) 344 (let ((pop-up-windows t))
337 (pop-to-buffer buffer t)) 345 (pop-to-buffer buffer t))
@@ -354,7 +362,11 @@ Optional argument NOT-RETURN is ignored.
354 362
355Optional argument EXIT-ACTION is either nil or a function with buffer as 363Optional argument EXIT-ACTION is either nil or a function with buffer as
356argument. This function is called when finished viewing buffer. Use 364argument. This function is called when finished viewing buffer. Use
357this argument instead of explicitly setting `view-exit-action'." 365this argument instead of explicitly setting `view-exit-action'.
366
367This function does not enable View mode if the buffer's major-mode
368has a `special' mode-class, because such modes usually have their
369own View-like bindings."
358 (interactive "bView buffer in other frame: \nP") 370 (interactive "bView buffer in other frame: \nP")
359 (let ((pop-up-frames t)) 371 (let ((pop-up-frames t))
360 (pop-to-buffer buffer t)) 372 (pop-to-buffer buffer t))