aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-12-06 01:30:39 +0000
committerRichard M. Stallman2006-12-06 01:30:39 +0000
commit9ac618de7ca5b18a21148682dc2380b3f377dede (patch)
tree147b4e7dd8ebe972fa8b30c74210543dda919bea
parent58c8f9156c7b7394d1f93a3f56c0c3e165e5bbf3 (diff)
downloademacs-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/ChangeLog5
-rw-r--r--man/text.texi42
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 @@
12006-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
12006-12-05 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> 62006-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
1039deeper heading lines and their body lines is called a @dfn{subtree}. 1039deeper 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
1043by setting the variable @code{outline-regexp}. Any line whose 1043setting the variable @code{outline-regexp}. (The recommended ways to
1044beginning has a match for this regexp is considered a heading line. 1044do this are in a major mode function or with a file local variable.)
1045Matches that start within a line (not at the left margin) do not count. 1045Any line whose beginning has a match for this regexp is considered a
1046The length of the matching text determines the level of the heading; 1046heading line. Matches that start within a line (not at the left
1047longer matches make a more deeply nested level. Thus, for example, 1047margin) do not count.
1048if a text formatter has commands @samp{@@chapter}, @samp{@@section} 1048
1049and @samp{@@subsection} to divide the document into chapters and 1049 The length of the matching text determines the level of the heading;
1050sections, you could make those lines count as heading lines by 1050longer matches make a more deeply nested level. Thus, for example, if
1051setting @code{outline-regexp} to @samp{"@@chap\\|@@\\(sub\\)*section"}. 1051a text formatter has commands @samp{@@chapter}, @samp{@@section} and
1052Note the trick: the two words @samp{chapter} and @samp{section} are equally 1052@samp{@@subsection} to divide the document into chapters and sections,
1053you could make those lines count as heading lines by setting
1054@code{outline-regexp} to @samp{"@@chap\\|@@\\(sub\\)*section"}. Note
1055the trick: the two words @samp{chapter} and @samp{section} are equally
1053long, but by defining the regexp to match only @samp{chap} we ensure 1056long, but by defining the regexp to match only @samp{chap} we ensure
1054that the length of the text matched on a chapter heading is shorter, 1057that the length of the text matched on a chapter heading is shorter,
1055so that Outline mode will know that sections are contained in chapters. 1058so that Outline mode will know that sections are contained in
1056This works as long as no other command starts with @samp{@@chap}. 1059chapters. 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
1060by setting the variable @code{outline-level}. The value of 1064heading line by setting the variable @code{outline-level}. The value
1061@code{outline-level} should be a function that takes no arguments and 1065of @code{outline-level} should be a function that takes no arguments
1062returns the level of the current heading. Some major modes such as C, 1066and returns the level of the current heading. The recommended ways to
1063Nroff, and Emacs Lisp mode set this variable and @code{outline-regexp} 1067set this variable are in a major mode command or with a file local
1064in order to work with Outline minor mode. 1068variable.
1065 1069
1066@node Outline Motion 1070@node Outline Motion
1067@subsection Outline Motion Commands 1071@subsection Outline Motion Commands