Function: hyrolo-outline-hide-subtree

hyrolo-outline-hide-subtree is an interactive and byte-compiled function defined in hyrolo.el.

Signature

(hyrolo-outline-hide-subtree)

Documentation

Move back to the start of current subtree and hide everything after the heading.

If within a file header, hide the whole file after the end of the current line.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hyrolo.el
(defun hyrolo-outline-hide-subtree ()
  "Move back to the start of current subtree and hide everything after the heading.
If within a file header, hide the whole file after the end of the current line."
  (interactive)
  (setq hyrolo-reveal-ignore-this-command t)
  (if (and (hyrolo-hdr-in-p)
	   (eq (current-buffer) (get-buffer hyrolo-display-buffer)))
      (cl-destructuring-bind (start end)
	  (hyrolo-cache-location-start-and-end)
	(setq start (line-end-position)
	      end (1- (or end (point-max))))
	;; Hide region
	(outline-flag-region start end t))
    (hyrolo-funcall-match
     (lambda ()
       (let ((opoint (point)))
	 (forward-line 0)
	 (unless (looking-at outline-regexp)
	   (outline-previous-visible-heading 1))
	 (if (looking-at outline-regexp)
	     (outline-hide-subtree)
	   (goto-char opoint))))
     t)))