Function: markdown-ts--follow-fragment
markdown-ts--follow-fragment is a byte-compiled function defined in
markdown-ts-mode.el.gz.
Signature
(markdown-ts--follow-fragment ID)
Documentation
Jump to the heading whose slug matches ID (without leading #).
Pushes the mark before moving so C-u C-SPC returns. Signals
user-error if no heading matches.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
(defun markdown-ts--follow-fragment (id)
"Jump to the heading whose slug matches ID (without leading `#').
Pushes the mark before moving so `C-u C-SPC' returns. Signals
`user-error' if no heading matches."
(if-let* ((pos (gethash id (markdown-ts--heading-ids))))
(progn
(push-mark)
(goto-char pos)
(recenter))
(user-error "No heading for fragment: #%s" id)))