Function: markdown-reference-goto-link
markdown-reference-goto-link is an interactive and byte-compiled
function defined in markdown-mode.el.
Signature
(markdown-reference-goto-link &optional REFERENCE)
Documentation
Jump to the location of the first use of REFERENCE.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown-reference-goto-link (&optional reference)
"Jump to the location of the first use of REFERENCE."
(interactive)
(unless reference
(if (thing-at-point-looking-at markdown-regex-reference-definition)
(setq reference (match-string-no-properties 2))
(user-error "No reference definition at point")))
(let ((links (markdown-reference-find-links reference)))
(cond ((= (length links) 1)
(goto-char (cadr (car links))))
((> (length links) 1)
(let ((oldbuf (current-buffer))
(linkbuf (markdown-reference-links-buffer)))
(with-current-buffer linkbuf
(insert "Links using reference " reference ":\n\n")
(dolist (link (reverse links))
(markdown-insert-link-button link oldbuf)))
(view-buffer-other-window linkbuf)
(goto-char (point-min))
(forward-line 2)))
(t
(error "No links for reference %s" reference)))))