diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-05-01 21:53:49 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-05-01 21:53:49 -0400 |
commit | e2a8724d9ced7f15559481adbaf4381e51d7ce25 (patch) | |
tree | c3f2860c1ab2702e58579d3a40f927c7484e78a0 | |
parent | 04c2eaca647afb3da42cd62574c7380d895afd6c (diff) | |
download | bog-e2a8724d9ced7f15559481adbaf4381e51d7ce25.tar.gz |
Correct misplaced save-excursion
-rw-r--r-- | bog.el | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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 () |