summaryrefslogtreecommitdiff
path: root/bog.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-05-01 21:53:49 -0400
committerKyle Meyer <kyle@kyleam.com>2014-05-01 21:53:49 -0400
commite2a8724d9ced7f15559481adbaf4381e51d7ce25 (patch)
treec3f2860c1ab2702e58579d3a40f927c7484e78a0 /bog.el
parent04c2eaca647afb3da42cd62574c7380d895afd6c (diff)
downloadbog-e2a8724d9ced7f15559481adbaf4381e51d7ce25.tar.gz
Correct misplaced save-excursion
Diffstat (limited to 'bog.el')
-rw-r--r--bog.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/bog.el b/bog.el
index 975b60e..3aab863 100644
--- a/bog.el
+++ b/bog.el
@@ -432,10 +432,10 @@ one entry per BibTeX file."
(bog-prepare-bib-file it t bog-bib-directory))))
(defun bog-prepare-bib-file (file &optional new-key new-directory)
- (save-excursion
- (let ((was-open (get-file-buffer file))
- (buffer (find-file-noselect file)))
- (with-current-buffer buffer
+ (let ((was-open (get-file-buffer file))
+ (buffer (find-file-noselect file)))
+ (with-current-buffer buffer
+ (save-excursion
(goto-char (point-min))
(bibtex-skip-to-valid-entry)
(bibtex-clean-entry new-key)
@@ -447,9 +447,9 @@ one entry per BibTeX file."
(rename-file file bib-file)
(rename-buffer bib-file)
(set-visited-file-name bib-file)
- (save-buffer)))
- (unless was-open
- (kill-buffer buffer)))))
+ (save-buffer))))
+ (unless was-open
+ (kill-buffer buffer))))
;;;###autoload
(defun bog-create-combined-bib ()