Function: outline-hide-region-body
outline-hide-region-body is a byte-compiled function defined in
outline.el.gz.
Signature
(outline-hide-region-body START END)
Documentation
Hide all body lines between START and END, but not headings.
Aliases
hide-region-body (obsolete since 25.1)
Source Code
;; Defined in /usr/src/emacs/lisp/outline.el.gz
(defun outline-hide-region-body (start end)
"Hide all body lines between START and END, but not headings."
;; Nullify the hook to avoid repeated calls to `outline-flag-region'
;; wasting lots of time running `lazy-lock-fontify-after-outline'
;; and run the hook finally.
(let (outline-view-change-hook)
(save-excursion
(save-restriction
(narrow-to-region start end)
(goto-char (point-min))
(if (outline-on-heading-p)
(outline-end-of-heading)
(outline-next-preface))
(while (not (eobp))
(outline-flag-region (point)
(progn (outline-next-preface) (point)) t)
(unless (eobp)
(forward-char (if (looking-at "\n\n") 2 1))
(outline-end-of-heading))))))
(run-hooks 'outline-view-change-hook))