Function: reftex-parse-bibitem

reftex-parse-bibitem is a byte-compiled function defined in reftex-cite.el.gz.

Signature

(reftex-parse-bibitem ITEM)

Documentation

Parse a ibitem entry in ITEM.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex-cite.el.gz
(defun reftex-parse-bibitem (item)
  "Parse a \bibitem entry in ITEM."
  (let ((key "") (text ""))
    (when (string-match "\\`{\\([^}]+\\)}\\([^\000]*\\)" item)
      (setq key (match-string 1 item)
            text (match-string 2 item)))
    ;; Clean up the text a little bit
    (while (string-match "[\n\r\t]\\|[ \t][ \t]+" text)
      (setq text (replace-match " " nil t text)))
    (if (string-match "\\`[ \t]+" text)
        (setq text (replace-match "" nil t text)))
    (list
     (cons "&key" key)
     (cons "&text" text)
     (cons "&entry" (concat key " " text)))))