summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2012-04-11 20:36:10 +0200
committerBastien Guerry <bzg@altern.org>2012-04-20 11:46:36 +0200
commit6010e18ce4a18b709d12c49b0d5195dd1f0cf089 (patch)
tree14b110a1f45cd322d0a5b27d9d97ec6438fcebfe
parentd87ec54d4bc5897b3b029043285c9d81f857d751 (diff)
downloadorg-mode-6010e18ce4a18b709d12c49b0d5195dd1f0cf089.tar.gz
org-latex.el: Append final newline to export buffer.
* lisp/org-latex.el: Ensure a final newline is appended to the export buffer. TINYCHANGE
-rw-r--r--lisp/org-latex.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 4418dee..8e05616 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1034,6 +1034,11 @@ when PUB-DIR is set, use this as the publishing directory."
(if (looking-at "[\n \t]+")
(replace-match "\n")))
+ ;; Ensure we have a final newline
+ (goto-char (point-max))
+ (or (eq (char-before) ?\n)
+ (insert ?\n))
+
(run-hooks 'org-export-latex-final-hook)
(if to-buffer
(unless (eq major-mode 'latex-mode) (latex-mode))