Function: bibtex-fill-entry
bibtex-fill-entry is an interactive and byte-compiled function defined
in bibtex.el.gz.
Signature
(bibtex-fill-entry)
Documentation
Fill current BibTeX entry.
Realign entry, so that every field starts on a separate line. Field
names appear in column bibtex-field-indentation, field text starts in
column bibtex-text-indentation and continuation lines start here, too.
If bibtex-align-at-equal-sign is non-nil, align equal signs, too.
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-fill-entry ()
"Fill current BibTeX entry.
Realign entry, so that every field starts on a separate line. Field
names appear in column `bibtex-field-indentation', field text starts in
column `bibtex-text-indentation' and continuation lines start here, too.
If `bibtex-align-at-equal-sign' is non-nil, align equal signs, too."
(interactive "*")
(let ((pnt (point-marker))
(beg (bibtex-beginning-of-entry)) ; move point
bounds)
(bibtex-delete-whitespace)
(indent-to-column bibtex-entry-offset)
(bibtex-beginning-first-field beg)
(while (setq bounds (bibtex-parse-field))
(bibtex-fill-field-bounds bounds t t))
(if (looking-at ",")
(forward-char))
(skip-chars-backward " \t\n")
(bibtex-delete-whitespace)
(insert "\n")
(indent-to-column bibtex-entry-offset)
(goto-char pnt)))