aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2011-08-16 11:40:31 +0300
committerEli Zaretskii2011-08-16 11:40:31 +0300
commit9adfcd0bf50066cc678ba65fb1b236d1c4ca0334 (patch)
treed0b411727ab36b20a0fa697efeea40ca4bd92d92
parent108628738193907452fc32b9d8a4be44ff589d89 (diff)
downloademacs-9adfcd0bf50066cc678ba65fb1b236d1c4ca0334.tar.gz
emacs-9adfcd0bf50066cc678ba65fb1b236d1c4ca0334.zip
Improve documentation of `special' modes.
doc/lispref/modes.texi (Major Mode Conventions): Improve the documentation of `mode-class' `special' modes.
-rw-r--r--doc/lispref/ChangeLog3
-rw-r--r--doc/lispref/modes.texi21
2 files changed, 16 insertions, 8 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 58ce89b7eef..56175a34eee 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,5 +1,8 @@
12011-08-16 Eli Zaretskii <eliz@gnu.org> 12011-08-16 Eli Zaretskii <eliz@gnu.org>
2 2
3 * modes.texi (Major Mode Conventions): Improve the documentation
4 of `mode-class' `special' modes.
5
3 * nonascii.texi (Character Properties): Document the `mirroring' 6 * nonascii.texi (Character Properties): Document the `mirroring'
4 property. Add index entries. 7 property. Add index entries.
5 8
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index dd3b2e3038f..a354265b365 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -505,21 +505,26 @@ this mode to any other major mode, this mode can set up a buffer-local
505value for @code{change-major-mode-hook} (@pxref{Creating Buffer-Local}). 505value for @code{change-major-mode-hook} (@pxref{Creating Buffer-Local}).
506 506
507@item 507@item
508If this mode is appropriate only for specially-prepared text, then the 508If this mode is appropriate only for specially-prepared text produced by
509major mode command symbol should have a property named @code{mode-class} 509the mode itself (rather than by the user typing at the keyboard or by an
510with value @code{special}, put on as follows: 510external file), then the major mode command symbol should have a
511property named @code{mode-class} with value @code{special}, put on as
512follows:
511 513
512@kindex mode-class @r{(property)} 514@kindex mode-class @r{(property)}
513@cindex @code{special} 515@cindex @code{special} modes
514@example 516@example
515(put 'funny-mode 'mode-class 'special) 517(put 'funny-mode 'mode-class 'special)
516@end example 518@end example
517 519
518@noindent 520@noindent
519This tells Emacs that new buffers created while the current buffer is 521This tells Emacs that new buffers created while the current buffer is in
520in Funny mode should not inherit Funny mode, in case the default value 522Funny mode should not be put in Funny mode, even though the default
521of @code{major-mode} is @code{nil}. Modes such as Dired, Rmail, 523value of @code{major-mode} is @code{nil}. By default, the value of
522and Buffer List use this feature. 524@code{nil} for @code{major-mode} means to use the current buffer's major
525mode when creating new buffers (@pxref{Auto Major Mode}), but with such
526@code{special} modes, Fundamental mode is used instead. Modes such as
527Dired, Rmail, and Buffer List use this feature.
523 528
524The @code{define-derived-mode} macro automatically marks the derived 529The @code{define-derived-mode} macro automatically marks the derived
525mode as special if the parent mode is special. The special mode 530mode as special if the parent mode is special. The special mode