Function: bibtex-name-in-field

bibtex-name-in-field is a byte-compiled function defined in bibtex.el.gz.

Signature

(bibtex-name-in-field BOUNDS &optional REMOVE-OPT-ALT)

Documentation

Get content of name in BibTeX field defined via BOUNDS.

If optional arg REMOVE-OPT-ALT is non-nil remove "OPT" and "ALT".

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/bibtex.el.gz
(defun bibtex-name-in-field (bounds &optional remove-opt-alt)
  "Get content of name in BibTeX field defined via BOUNDS.
If optional arg REMOVE-OPT-ALT is non-nil remove \"OPT\" and \"ALT\"."
  (let ((name (buffer-substring-no-properties
               (bibtex-start-of-name-in-field bounds)
               (bibtex-end-of-name-in-field bounds))))
    (if (and remove-opt-alt
             (string-match "\\`\\(OPT\\|ALT\\)" name)
             (not (and bibtex-no-opt-remove-re
                       (string-match bibtex-no-opt-remove-re name))))
        (substring name 3)
      name)))