50 |
;; already assigned a local value to it. |
;; already assigned a local value to it. |
51 |
(or (default-value 'outline-regexp) |
(or (default-value 'outline-regexp) |
52 |
(setq-default outline-regexp "[*\^L]+")) |
(setq-default outline-regexp "[*\^L]+")) |
53 |
|
|
54 |
(defcustom outline-heading-end-regexp "[\n\^M]" |
(defcustom outline-heading-end-regexp "[\n\^M]" |
55 |
"*Regular expression to match the end of a heading line. |
"*Regular expression to match the end of a heading line. |
56 |
You can assume that point is at the beginning of a heading when this |
You can assume that point is at the beginning of a heading when this |
166 |
(defun outline-mode () |
(defun outline-mode () |
167 |
"Set major mode for editing outlines with selective display. |
"Set major mode for editing outlines with selective display. |
168 |
Headings are lines which start with asterisks: one for major headings, |
Headings are lines which start with asterisks: one for major headings, |
169 |
two for subheadings, etc. Lines not starting with asterisks are body lines. |
two for subheadings, etc. Lines not starting with asterisks are body lines. |
170 |
|
|
171 |
Body text or subheadings under a heading can be made temporarily |
Body text or subheadings under a heading can be made temporarily |
172 |
invisible, or visible again. Invisible lines are attached to the end |
invisible, or visible again. Invisible lines are attached to the end |
173 |
of the heading, so they move with it, if the line is killed and yanked |
of the heading, so they move with it, if the line is killed and yanked |
174 |
back. A heading with text hidden under it is marked with an ellipsis (...). |
back. A heading with text hidden under it is marked with an ellipsis (...). |
175 |
|
|
533 |
(outline-back-to-heading) |
(outline-back-to-heading) |
534 |
(while (> arg 0) |
(while (> arg 0) |
535 |
(let ((point-to-move-to (save-excursion |
(let ((point-to-move-to (save-excursion |
536 |
(outline-get-next-sibling)))) |
(outline-get-next-sibling)))) |
537 |
(if point-to-move-to |
(if point-to-move-to |
538 |
(progn |
(progn |
539 |
(goto-char point-to-move-to) |
(goto-char point-to-move-to) |
552 |
(if (< (funcall outline-level) level) |
(if (< (funcall outline-level) level) |
553 |
nil |
nil |
554 |
(point)))) |
(point)))) |
555 |
|
|
556 |
(defun outline-backward-same-level (arg) |
(defun outline-backward-same-level (arg) |
557 |
"Move backward to the ARG'th subheading at same level as this one. |
"Move backward to the ARG'th subheading at same level as this one. |
558 |
Stop at the first and last subheadings of a superior heading." |
Stop at the first and last subheadings of a superior heading." |