Function: Info-prev-reference-or-link
Info-prev-reference-or-link is a byte-compiled function defined in
info.el.gz.
Signature
(Info-prev-reference-or-link PAT PROP)
Documentation
Move point to the previous pattern-based cross-reference or property-based link.
The previous cross-reference is searched using the regexp PAT, and the previous
link is searched using the text property PROP. Move point to the closest found
position of either a cross-reference found by re-search-backward or a link
found by previous-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-prev-reference-or-link (pat prop)
"Move point to the previous pattern-based cross-reference or property-based link.
The previous cross-reference is searched using the regexp PAT, and the previous
link is searched using the text property PROP. Move point to the closest found
position of either a cross-reference found by `re-search-backward' or a link
found by `previous-single-char-property-change'.
Return the new position of point, or nil."
(let ((pxref (save-excursion (re-search-backward pat nil t)))
(plink (previous-single-char-property-change (point) prop)))
(when (and (> plink (point-min)) (not (get-char-property plink prop)))
(setq plink (previous-single-char-property-change plink prop)))
(if (> plink (point-min))
(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)))))))