Function: reftex-find-start-point

reftex-find-start-point is an autoloaded and byte-compiled function defined in reftex-sel.el.gz.

Signature

(reftex-find-start-point FALLBACK &rest LOCATIONS)

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex-sel.el.gz
;;;###autoload
(defun reftex-find-start-point (fallback &rest locations)
  ;; Set point to the first available LOCATION.  When a LOCATION is a list,
  ;; search for such a :data text property.  When it is an integer,
  ;; use is as line number.  FALLBACK is a buffer position used if everything
  ;; else  fails.
  (catch 'exit
    (goto-char (point-min))
    (let (loc pos)
      (while locations
        (setq loc (pop locations))
        (cond
         ((null loc))
         ((listp loc)
          (setq pos (text-property-any (point-min) (point-max) :data loc))
          (when pos
            (goto-char pos)
            (throw 'exit t)))
         ((integerp loc)
          (when (<= loc (count-lines (point-min) (point-max)))
            (goto-char (point-min))
            (forward-line (1- loc))
            (throw 'exit t)))))
      (goto-char fallback))))