diff options
| -rw-r--r-- | lisp/textmodes/outline.el | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/textmodes/outline.el b/lisp/textmodes/outline.el index 823f92e4065..23d5c1520aa 100644 --- a/lisp/textmodes/outline.el +++ b/lisp/textmodes/outline.el | |||
| @@ -40,19 +40,16 @@ | |||
| 40 | :prefix "outline-" | 40 | :prefix "outline-" |
| 41 | :group 'editing) | 41 | :group 'editing) |
| 42 | 42 | ||
| 43 | (defcustom outline-regexp nil | 43 | (defcustom outline-regexp "[*\^L]+" |
| 44 | "*Regular expression to match the beginning of a heading. | 44 | "*Regular expression to match the beginning of a heading. |
| 45 | Any line whose beginning matches this regexp is considered to start a heading. | 45 | Any line whose beginning matches this regexp is considered to start a heading. |
| 46 | Note that Outline mode only checks this regexp at the start of a line, | ||
| 47 | so the regexp need not (and usually does not) start with `^'. | ||
| 46 | The recommended way to set this is with a Local Variables: list | 48 | The recommended way to set this is with a Local Variables: list |
| 47 | in the file it applies to. See also `outline-heading-end-regexp'." | 49 | in the file it applies to. See also `outline-heading-end-regexp'." |
| 48 | :type '(choice regexp (const nil)) | 50 | :type '(choice regexp (const nil)) |
| 49 | :group 'outlines) | 51 | :group 'outlines) |
| 50 | 52 | ||
| 51 | ;; Can't initialize this in the defvar above -- some major modes have | ||
| 52 | ;; already assigned a local value to it. | ||
| 53 | (or (default-value 'outline-regexp) | ||
| 54 | (setq-default outline-regexp "[*\^L]+")) | ||
| 55 | |||
| 56 | (defcustom outline-heading-end-regexp "\n" | 53 | (defcustom outline-heading-end-regexp "\n" |
| 57 | "*Regular expression to match the end of a heading line. | 54 | "*Regular expression to match the end of a heading line. |
| 58 | You can assume that point is at the beginning of a heading when this | 55 | You can assume that point is at the beginning of a heading when this |