Function: ffap-next-guess
ffap-next-guess is a byte-compiled function defined in ffap.el.gz.
Signature
(ffap-next-guess &optional BACK LIM)
Documentation
Move point to next file or URL, and return it as a string.
If nothing is found, leave point at limit and return nil.
Optional BACK argument makes search backwards.
Optional LIM argument limits the search.
Only considers strings that match ffap-next-regexp.
Source Code
;; Defined in /usr/src/emacs/lisp/ffap.el.gz
(defun ffap-next-guess (&optional back lim)
"Move point to next file or URL, and return it as a string.
If nothing is found, leave point at limit and return nil.
Optional BACK argument makes search backwards.
Optional LIM argument limits the search.
Only considers strings that match `ffap-next-regexp'."
(or lim (setq lim (if back (point-min) (point-max))))
(let (guess)
(while (not (or guess (eq (point) lim)))
(funcall (if back 're-search-backward 're-search-forward)
ffap-next-regexp lim 'move)
(setq guess (ffap-guesser)))
;; Go to end, so we do not get same guess twice:
(goto-char (nth (if back 0 1) ffap-string-at-point-region))
(setq ffap-next-guess guess)))