Function: markdown-narrow-to-subtree

markdown-narrow-to-subtree is an interactive and natively compiled function defined in markdown-mode.el.

Signature

(markdown-narrow-to-subtree)

Documentation

Narrow buffer to the current subtree.

Key Bindings

markdown-mode-map C-x n s

Source Code

;; Defined in /nix/store/p33zgg95aglc47pl6zlgs43vki0snxf8-emacs-packages-deps/share/emacs/site-lisp/elpa/markdown-mode-20260827.909/markdown-mode.el
(defun markdown-narrow-to-subtree ()
  "Narrow buffer to the current subtree."
  (interactive)
  (save-excursion
    (save-match-data
      (narrow-to-region
       (progn (markdown-back-to-heading-over-code-block t) (point))
       (progn (markdown-end-of-subtree)
              (if (and (markdown-heading-at-point) (not (eobp)))
                  (backward-char 1))
              (point))))))