Function: bibtex-parse-entry
bibtex-parse-entry is a byte-compiled function defined in
bibtex.el.gz.
Signature
(bibtex-parse-entry &optional CONTENT KEEP-OPT-ALT)
Documentation
Parse entry at point, return an alist.
The alist elements have the form (FIELD . TEXT), where FIELD can also be the special strings "=type=" and "=key=". For the FIELD "=key=" TEXT may be nil. Move point to the end of the last field. If optional arg CONTENT is non-nil extract content of text fields. Remove "OPT" and "ALT" from FIELD unless KEEP-OPT-ALT is non-nil.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/bibtex.el.gz
(defun bibtex-parse-entry (&optional content keep-opt-alt)
"Parse entry at point, return an alist.
The alist elements have the form (FIELD . TEXT), where FIELD can also be
the special strings \"=type=\" and \"=key=\". For the FIELD \"=key=\"
TEXT may be nil. Move point to the end of the last field.
If optional arg CONTENT is non-nil extract content of text fields.
Remove \"OPT\" and \"ALT\" from FIELD unless KEEP-OPT-ALT is non-nil."
(let (alist bounds)
(when (looking-at bibtex-entry-maybe-empty-head)
(push (cons "=type=" (bibtex-type-in-head)) alist)
(push (cons "=key=" (bibtex-key-in-head)) alist)
(goto-char (match-end 0))
(while (setq bounds (bibtex-parse-field))
(push (cons (bibtex-name-in-field bounds (not keep-opt-alt))
(bibtex-text-in-field-bounds bounds content))
alist)
(goto-char (bibtex-end-of-field bounds))))
(nreverse alist)))