Function: outline-hide-by-heading-regexp
outline-hide-by-heading-regexp is an interactive and byte-compiled
function defined in outline.el.gz.
Signature
(outline-hide-by-heading-regexp REGEXP)
Documentation
Hide outlines whose headings match REGEXP.
Probably introduced at or before Emacs version 30.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/outline.el.gz
(defun outline-hide-by-heading-regexp (regexp)
"Hide outlines whose headings match REGEXP."
(interactive (list (read-regexp "Regexp to hide outlines")))
(let (outline-view-change-hook)
(outline-map-region
(lambda ()
(when (string-match-p regexp (buffer-substring (pos-bol) (pos-eol)))
(outline-hide-subtree)))
(point-min) (point-max)))
(run-hooks 'outline-view-change-hook))