From ea55493083ba08ac96e6cf130f24ac38c94abb45 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 18 Sep 2015 12:45:10 -0400 Subject: 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. --- bog.el | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v1.2.3