diff options
| author | Eli Zaretskii | 2011-08-16 11:40:31 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2011-08-16 11:40:31 +0300 |
| commit | 9adfcd0bf50066cc678ba65fb1b236d1c4ca0334 (patch) | |
| tree | d0b411727ab36b20a0fa697efeea40ca4bd92d92 | |
| parent | 108628738193907452fc32b9d8a4be44ff589d89 (diff) | |
| download | emacs-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/ChangeLog | 3 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 21 |
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 @@ | |||
| 1 | 2011-08-16 Eli Zaretskii <eliz@gnu.org> | 1 | 2011-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 | |||
| 505 | value for @code{change-major-mode-hook} (@pxref{Creating Buffer-Local}). | 505 | value for @code{change-major-mode-hook} (@pxref{Creating Buffer-Local}). |
| 506 | 506 | ||
| 507 | @item | 507 | @item |
| 508 | If this mode is appropriate only for specially-prepared text, then the | 508 | If this mode is appropriate only for specially-prepared text produced by |
| 509 | major mode command symbol should have a property named @code{mode-class} | 509 | the mode itself (rather than by the user typing at the keyboard or by an |
| 510 | with value @code{special}, put on as follows: | 510 | external file), then the major mode command symbol should have a |
| 511 | property named @code{mode-class} with value @code{special}, put on as | ||
| 512 | follows: | ||
| 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 |
| 519 | This tells Emacs that new buffers created while the current buffer is | 521 | This tells Emacs that new buffers created while the current buffer is in |
| 520 | in Funny mode should not inherit Funny mode, in case the default value | 522 | Funny mode should not be put in Funny mode, even though the default |
| 521 | of @code{major-mode} is @code{nil}. Modes such as Dired, Rmail, | 523 | value of @code{major-mode} is @code{nil}. By default, the value of |
| 522 | and Buffer List use this feature. | 524 | @code{nil} for @code{major-mode} means to use the current buffer's major |
| 525 | mode when creating new buffers (@pxref{Auto Major Mode}), but with such | ||
| 526 | @code{special} modes, Fundamental mode is used instead. Modes such as | ||
| 527 | Dired, Rmail, and Buffer List use this feature. | ||
| 523 | 528 | ||
| 524 | The @code{define-derived-mode} macro automatically marks the derived | 529 | The @code{define-derived-mode} macro automatically marks the derived |
| 525 | mode as special if the parent mode is special. The special mode | 530 | mode as special if the parent mode is special. The special mode |