summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-09-18 12:45:10 -0400
committerKyle Meyer <kyle@kyleam.com>2015-09-18 18:30:25 -0400
commitea55493083ba08ac96e6cf130f24ac38c94abb45 (patch)
tree02e11d6c2cd146891e6789416e0416e26eb046b5
parent591803d1c30c9cadd027dccd2504c0b4c019d285 (diff)
downloadbog-ea55493083ba08ac96e6cf130f24ac38c94abb45.tar.gz
bog--prepare-bib-file: Set dialect
Otherwise, if this has not already been done globally (e.g., by visiting a .bib file), bibtex-entry-head is not set and bibtex-valid-entry fails with a type error.
-rw-r--r--bog.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/bog.el b/bog.el
index a354946..50fe3c7 100644
--- a/bog.el
+++ b/bog.el
@@ -762,6 +762,9 @@ one entry per BibTeX file."
(with-temp-buffer
(bibtex-mode)
(insert-file-contents file)
+ ;; Make sure `bibtex-entry-head' is set since we're not visiting
+ ;; a file.
+ (unless bibtex-entry-head (bibtex-set-dialect nil 'local))
(bibtex-skip-to-valid-entry)
(bibtex-clean-entry new-key)
(if (looking-at bibtex-entry-head)