diff options
| author | Richard M. Stallman | 2006-12-06 01:30:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-12-06 01:30:39 +0000 |
| commit | 9ac618de7ca5b18a21148682dc2380b3f377dede (patch) | |
| tree | 147b4e7dd8ebe972fa8b30c74210543dda919bea | |
| parent | 58c8f9156c7b7394d1f93a3f56c0c3e165e5bbf3 (diff) | |
| download | emacs-9ac618de7ca5b18a21148682dc2380b3f377dede.tar.gz emacs-9ac618de7ca5b18a21148682dc2380b3f377dede.zip | |
(Outline Format): Say to set outline-regexp
and outline-level with major modes and file local variables.
| -rw-r--r-- | man/ChangeLog | 5 | ||||
| -rw-r--r-- | man/text.texi | 42 |
2 files changed, 28 insertions, 19 deletions
diff --git a/man/ChangeLog b/man/ChangeLog index 7682e006ae3..212da90ae1b 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-12-06 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * text.texi (Outline Format): Say to set outline-regexp | ||
| 4 | and outline-level with major modes and file local variables. | ||
| 5 | |||
| 1 | 2006-12-05 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> | 6 | 2006-12-05 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> |
| 2 | 7 | ||
| 3 | * anti.texi (Antinews): Mention the alternative to | 8 | * anti.texi (Antinews): Mention the alternative to |
diff --git a/man/text.texi b/man/text.texi index 78f35c9f8ca..e27be49248f 100644 --- a/man/text.texi +++ b/man/text.texi | |||
| @@ -1039,29 +1039,33 @@ collectively an @dfn{entry}. A heading line together with all following | |||
| 1039 | deeper heading lines and their body lines is called a @dfn{subtree}. | 1039 | deeper heading lines and their body lines is called a @dfn{subtree}. |
| 1040 | 1040 | ||
| 1041 | @vindex outline-regexp | 1041 | @vindex outline-regexp |
| 1042 | You can customize the criterion for distinguishing heading lines | 1042 | You can customize the criterion for distinguishing heading lines by |
| 1043 | by setting the variable @code{outline-regexp}. Any line whose | 1043 | setting the variable @code{outline-regexp}. (The recommended ways to |
| 1044 | beginning has a match for this regexp is considered a heading line. | 1044 | do this are in a major mode function or with a file local variable.) |
| 1045 | Matches that start within a line (not at the left margin) do not count. | 1045 | Any line whose beginning has a match for this regexp is considered a |
| 1046 | The length of the matching text determines the level of the heading; | 1046 | heading line. Matches that start within a line (not at the left |
| 1047 | longer matches make a more deeply nested level. Thus, for example, | 1047 | margin) do not count. |
| 1048 | if a text formatter has commands @samp{@@chapter}, @samp{@@section} | 1048 | |
| 1049 | and @samp{@@subsection} to divide the document into chapters and | 1049 | The length of the matching text determines the level of the heading; |
| 1050 | sections, you could make those lines count as heading lines by | 1050 | longer matches make a more deeply nested level. Thus, for example, if |
| 1051 | setting @code{outline-regexp} to @samp{"@@chap\\|@@\\(sub\\)*section"}. | 1051 | a text formatter has commands @samp{@@chapter}, @samp{@@section} and |
| 1052 | Note the trick: the two words @samp{chapter} and @samp{section} are equally | 1052 | @samp{@@subsection} to divide the document into chapters and sections, |
| 1053 | you could make those lines count as heading lines by setting | ||
| 1054 | @code{outline-regexp} to @samp{"@@chap\\|@@\\(sub\\)*section"}. Note | ||
| 1055 | the trick: the two words @samp{chapter} and @samp{section} are equally | ||
| 1053 | long, but by defining the regexp to match only @samp{chap} we ensure | 1056 | long, but by defining the regexp to match only @samp{chap} we ensure |
| 1054 | that the length of the text matched on a chapter heading is shorter, | 1057 | that the length of the text matched on a chapter heading is shorter, |
| 1055 | so that Outline mode will know that sections are contained in chapters. | 1058 | so that Outline mode will know that sections are contained in |
| 1056 | This works as long as no other command starts with @samp{@@chap}. | 1059 | chapters. This works as long as no other command starts with |
| 1060 | @samp{@@chap}. | ||
| 1057 | 1061 | ||
| 1058 | @vindex outline-level | 1062 | @vindex outline-level |
| 1059 | You can change the rule for calculating the level of a heading line | 1063 | You can explicitly specify a rule for calculating the level of a |
| 1060 | by setting the variable @code{outline-level}. The value of | 1064 | heading line by setting the variable @code{outline-level}. The value |
| 1061 | @code{outline-level} should be a function that takes no arguments and | 1065 | of @code{outline-level} should be a function that takes no arguments |
| 1062 | returns the level of the current heading. Some major modes such as C, | 1066 | and returns the level of the current heading. The recommended ways to |
| 1063 | Nroff, and Emacs Lisp mode set this variable and @code{outline-regexp} | 1067 | set this variable are in a major mode command or with a file local |
| 1064 | in order to work with Outline minor mode. | 1068 | variable. |
| 1065 | 1069 | ||
| 1066 | @node Outline Motion | 1070 | @node Outline Motion |
| 1067 | @subsection Outline Motion Commands | 1071 | @subsection Outline Motion Commands |