Function: bibtex-convert-alien

bibtex-convert-alien is an interactive and byte-compiled function defined in bibtex.el.gz.

Signature

(bibtex-convert-alien &optional READ-OPTIONS)

Documentation

Make an alien BibTeX buffer fully usable by BibTeX mode.

If a file does not conform with all standards used by BibTeX mode, some of the high-level features of BibTeX mode are not available. This function tries to convert current buffer to conform with these standards. With prefix argument READ-OPTIONS non-nil, read options for reformatting entries from minibuffer.

Probably introduced at or before Emacs version 20.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/bibtex.el.gz
(defun bibtex-convert-alien (&optional read-options)
  "Make an alien BibTeX buffer fully usable by BibTeX mode.
If a file does not conform with all standards used by BibTeX mode,
some of the high-level features of BibTeX mode are not available.
This function tries to convert current buffer to conform with these standards.
With prefix argument READ-OPTIONS non-nil, read options for reformatting
entries from minibuffer."
  (interactive "*P")
  (message "Starting to validate buffer...")
  (sit-for 1)
  (bibtex-realign)
  (deactivate-mark)  ; So `bibtex-validate' works on the whole buffer.
  (if (not (let (bibtex-maintain-sorted-entries)
             (bibtex-validate)))
      (message "Correct errors and call `bibtex-convert-alien' again")
    (message "Starting to reformat entries...")
    (sit-for 2)
    (bibtex-reformat read-options)
    (goto-char (point-max))
    (message "Buffer is now parsable.  Please save it.")))