Function: bibtex-entry-alist

bibtex-entry-alist is a byte-compiled function defined in bibtex.el.gz.

Signature

(bibtex-entry-alist DIALECT)

Documentation

Return entry-alist for DIALECT.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/bibtex.el.gz
(defun bibtex-entry-alist (dialect)
  "Return entry-alist for DIALECT."
  (let ((var (intern (format "bibtex-%s-entry-alist" dialect)))
        entry-alist)
    (if (boundp var)
        (setq entry-alist (symbol-value var))
      (user-error "BibTeX dialect `%s' undefined" dialect))
    (if (not (consp (nth 1 (car entry-alist))))
        ;; new format
        entry-alist
      (let (lst)
        (dolist (entry entry-alist)
          (let ((fl (nth 1 entry)) req xref opt)
            (dolist (field (copy-tree (car fl)))
              (if (nth 3 field) (setcar (nthcdr 3 field) 0))
              (if (or (not (nth 2 entry))
                      (assoc-string (car field) (car (nth 2 entry)) t))
                  (push field req)
                (push field xref)))
            (dolist (field (nth 1 fl))
              (push field opt))
            (push (list (car entry) nil (nreverse req)
                        (nreverse xref) (nreverse opt))
                  lst)))
        (nreverse lst)))))