diff options
| author | Richard M. Stallman | 2005-02-16 10:08:30 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-02-16 10:08:30 +0000 |
| commit | 40be66535c2f57c9d2b8afd8a7b68a7deba7cb3d (patch) | |
| tree | c65c9920b62a50395e1c6317fdbd8145a6b6a7a8 | |
| parent | bb18ce6a125b45320d30c6b8b420905c4734b945 (diff) | |
| download | emacs-40be66535c2f57c9d2b8afd8a7b68a7deba7cb3d.tar.gz emacs-40be66535c2f57c9d2b8afd8a7b68a7deba7cb3d.zip | |
(Choosing Modes): Clarify.
| -rw-r--r-- | man/major.texi | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/man/major.texi b/man/major.texi index a7c3a9062cf..fa44b873031 100644 --- a/man/major.texi +++ b/man/major.texi | |||
| @@ -92,14 +92,14 @@ For example, one element normally found in the list has the form | |||
| 92 | @code{(@t{"\\.c\\'"} . c-mode)}, and it is responsible for selecting C | 92 | @code{(@t{"\\.c\\'"} . c-mode)}, and it is responsible for selecting C |
| 93 | mode for files whose names end in @file{.c}. (Note that @samp{\\} is | 93 | mode for files whose names end in @file{.c}. (Note that @samp{\\} is |
| 94 | needed in Lisp syntax to include a @samp{\} in the string, which must | 94 | needed in Lisp syntax to include a @samp{\} in the string, which must |
| 95 | be used to suppress the special meaning of @samp{.} in regexps.) If the | 95 | be used to suppress the special meaning of @samp{.} in regexps.) If |
| 96 | element has the form @code{(@var{regexp} @var{mode-function} | 96 | the element has the form @code{(@var{regexp} @var{mode-function} |
| 97 | @var{flag})} and @var{flag} is non-@code{nil}, then after calling | 97 | @var{flag})} and @var{flag} is non-@code{nil}, then after calling |
| 98 | @var{mode-function}, the suffix that matched @var{regexp} is discarded | 98 | @var{mode-function}, Emacs discards the suffix that matched |
| 99 | and the list is searched again for another match. | 99 | @var{regexp} and searches the list again for another match. |
| 100 | 100 | ||
| 101 | You can specify which major mode should be used for editing a certain | 101 | You can specify the major mode to use for editing a certain file by |
| 102 | file by a special sort of text in the first nonblank line of the file. The | 102 | special text in the first nonblank line of the file. The |
| 103 | mode name should appear in this line both preceded and followed by | 103 | mode name should appear in this line both preceded and followed by |
| 104 | @samp{-*-}. Other text may appear on the line as well. For example, | 104 | @samp{-*-}. Other text may appear on the line as well. For example, |
| 105 | 105 | ||
| @@ -166,6 +166,7 @@ the file's local variables list (if any). | |||
| 166 | @vindex change-major-mode-with-file-name | 166 | @vindex change-major-mode-with-file-name |
| 167 | The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to | 167 | The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to |
| 168 | a new major mode if the new file name implies a mode (@pxref{Saving}). | 168 | a new major mode if the new file name implies a mode (@pxref{Saving}). |
| 169 | (@kbd{C-x C-s} does this too, if the buffer wasn't visiting a file.) | ||
| 169 | However, this does not happen if the buffer contents specify a major | 170 | However, this does not happen if the buffer contents specify a major |
| 170 | mode, and certain ``special'' major modes do not allow the mode to | 171 | mode, and certain ``special'' major modes do not allow the mode to |
| 171 | change. You can turn off this mode-changing feature by setting | 172 | change. You can turn off this mode-changing feature by setting |