summaryrefslogtreecommitdiff
path: root/bog.el
diff options
context:
space:
mode:
Diffstat (limited to 'bog.el')
-rw-r--r--bog.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/bog.el b/bog.el
index 18b3e93..3ee30c1 100644
--- a/bog.el
+++ b/bog.el
@@ -617,8 +617,10 @@ one entry per BibTeX file."
(insert-file-contents file)
(bibtex-skip-to-valid-entry)
(bibtex-clean-entry new-key)
- (setq bib-file (expand-file-name (concat (bibtex-key-in-head) ".bib")
- new-directory))
+ (if (looking-at bibtex-entry-head)
+ (setq bib-file (expand-file-name (concat (bibtex-key-in-head) ".bib")
+ new-directory))
+ (error "BibTeX header line looks wrong"))
(write-file bib-file))
;; If a buffer was visiting the original bib file, point it to the
;; new file.