Function: markdown-next-link

markdown-next-link is an interactive and byte-compiled function defined in markdown-mode.el.

Signature

(markdown-next-link)

Documentation

Jump to next inline, reference, or wiki link.

If successful, return point. Otherwise, return nil. See markdown-wiki-link-p and markdown-previous-wiki-link.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown-next-link ()
  "Jump to next inline, reference, or wiki link.
If successful, return point.  Otherwise, return nil.
See `markdown-wiki-link-p' and `markdown-previous-wiki-link'."
  (interactive)
  (let ((opoint (point)))
    (when (or (markdown-link-p) (markdown-wiki-link-p))
      ;; At a link already, move past it.
      (goto-char (+ (match-end 0) 1)))
    ;; Search for the next wiki link and move to the beginning.
    (while (and (re-search-forward (markdown-make-regex-link-generic) nil t)
                (markdown-code-block-at-point-p)
                (< (point) (point-max))))
    (if (and (not (eq (point) opoint))
             (or (markdown-link-p) (markdown-wiki-link-p)))
        ;; Group 1 will move past non-escape character in wiki link regexp.
        ;; Go to beginning of group zero for all other link types.
        (goto-char (or (match-beginning 1) (match-beginning 0)))
      (goto-char opoint)
      nil)))