Function: Info-next-reference-or-link
Info-next-reference-or-link is a byte-compiled function defined in
info.el.gz.
Signature
(Info-next-reference-or-link PAT PROP)
Documentation
Move point to the next pattern-based cross-reference or property-based link.
The next cross-reference is searched using the regexp PAT, and the next link
is searched using the text property PROP. Move point to the closest found
position of either a cross-reference found by re-search-forward or a link
found by next-single-char-property-change.
Return the new position of point, or nil.
Source Code
;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-next-reference-or-link (pat prop)
"Move point to the next pattern-based cross-reference or property-based link.
The next cross-reference is searched using the regexp PAT, and the next link
is searched using the text property PROP. Move point to the closest found
position of either a cross-reference found by `re-search-forward' or a link
found by `next-single-char-property-change'.
Return the new position of point, or nil."
(let ((pxref (save-excursion (re-search-forward pat nil t)))
(plink (next-single-char-property-change (point) prop)))
(when (and (< plink (point-max)) (not (get-char-property plink prop)))
(setq plink (next-single-char-property-change plink prop)))
(if (< plink (point-max))
(if (and pxref (<= pxref plink))
(goto-char (or (match-beginning 1) (match-beginning 0)))
(goto-char plink))
(if pxref (goto-char (or (match-beginning 1) (match-beginning 0)))))))