From 16f700702c681989b04c1899b17a0f022d3b0125 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 7 Nov 2016 17:55:42 +0200 Subject: Improve and clarify documentation of Outline Mode * doc/emacs/text.texi (Outline Visibility): Use the outline-* names instead of the obsolete aliases. (Bug#24890) * lisp/outline.el (outline-hide-sublevels, outline-hide-other) (outline-hide-body): Doc fixes. (Bug#24890) --- lisp/outline.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lisp/outline.el') diff --git a/lisp/outline.el b/lisp/outline.el index 2001cdf27b1..f94dbb954a3 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -788,7 +788,8 @@ Show the heading too, if it is currently invisible." 'show-entry 'outline-show-entry "25.1") (defun outline-hide-body () - "Hide all body lines in buffer, leaving all headings visible." + "Hide all body lines in buffer, leaving all headings visible. +Note that this does not hide the lines preceding the first heading line." (interactive) (outline-hide-region-body (point-min) (point-max))) @@ -868,7 +869,12 @@ Show the heading too, if it is currently invisible." nil)) (defun outline-hide-sublevels (levels) - "Hide everything but the top LEVELS levels of headers, in whole buffer." + "Hide everything but the top LEVELS levels of headers, in whole buffer. +This also unhides the top heading-less body, if any. + +Interactively, the prefix argument supplies the value of LEVELS. +When invoked without a prefix argument, LEVELS defaults to the level +of the current heading, or to 1 if the current line is not a heading." (interactive (list (cond (current-prefix-arg (prefix-numeric-value current-prefix-arg)) @@ -909,7 +915,8 @@ Show the heading too, if it is currently invisible." 'hide-sublevels 'outline-hide-sublevels "25.1") (defun outline-hide-other () - "Hide everything except current body and parent and top-level headings." + "Hide everything except current body and parent and top-level headings. +This also unhides the top heading-less body, if any." (interactive) (outline-hide-sublevels 1) (let (outline-view-change-hook) -- cgit v1.2.1