Function: bibtex-skip-to-valid-entry
bibtex-skip-to-valid-entry is an interactive and byte-compiled
function defined in bibtex.el.gz.
Signature
(bibtex-skip-to-valid-entry &optional BACKWARD)
Documentation
Move point to beginning of the next valid BibTeX entry.
Do not move if we are already at beginning of a valid BibTeX entry.
With optional argument BACKWARD non-nil, move backward to
beginning of previous valid one. A valid entry is a syntactical correct one
with type contained in bibtex-BibTeX-entry-alist or, if
bibtex-sort-ignore-string-entries is nil, a syntactical correct string
entry. Return buffer position of beginning and end of entry if a valid
entry is found, nil otherwise.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/bibtex.el.gz
(defun bibtex-skip-to-valid-entry (&optional backward)
"Move point to beginning of the next valid BibTeX entry.
Do not move if we are already at beginning of a valid BibTeX entry.
With optional argument BACKWARD non-nil, move backward to
beginning of previous valid one. A valid entry is a syntactical correct one
with type contained in `bibtex-BibTeX-entry-alist' or, if
`bibtex-sort-ignore-string-entries' is nil, a syntactical correct string
entry. Return buffer position of beginning and end of entry if a valid
entry is found, nil otherwise."
(interactive "P")
(let ((case-fold-search t)
found bounds)
(beginning-of-line)
;; Loop till we look at a valid entry.
(while (not (or found (if backward (bobp) (eobp))))
(cond ((setq found (or (bibtex-valid-entry)
(and (not bibtex-sort-ignore-string-entries)
(setq bounds (bibtex-parse-string))
(cons (bibtex-start-of-field bounds)
(bibtex-end-of-string bounds))))))
(backward (re-search-backward "^[ \t]*@" nil 'move))
(t (if (re-search-forward "\n\\([ \t]*@\\)" nil 'move)
(goto-char (match-beginning 1))))))
found))