Function: reftex-bib-or-thebib

reftex-bib-or-thebib is an autoloaded and byte-compiled function defined in reftex-cite.el.gz.

Signature

(reftex-bib-or-thebib)

Documentation

Test if BibTeX or \begin{thebibliography} should be used for the citation.

Find the bof of the current file.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex-cite.el.gz
;;;###autoload
(defun reftex-bib-or-thebib ()
  "Test if BibTeX or \\begin{thebibliography} should be used for the citation.
Find the bof of the current file."
  (let* ((docstruct (symbol-value reftex-docstruct-symbol))
         (rest (or (member (list 'bof (reftex--get-buffer-identifier))
                           docstruct)
                   docstruct))
         (bib (assq 'bib rest))
         (thebib (assq 'thebib rest))
         (bibmem (memq bib rest))
         (thebibmem (memq thebib rest)))
    (when (not (or thebib bib))
      (setq bib (assq 'bib docstruct)
            thebib (assq 'thebib docstruct)
            bibmem (memq bib docstruct)
            thebibmem (memq thebib docstruct)))
    (if (> (length bibmem) (length thebibmem))
        (if bib 'bib nil)
      (if thebib 'thebib nil))))