Make sure result buffer of LaTeX export is in LaTeX mode

Report and patch from Dan Davison
This commit is contained in:
Carsten Dominik 2010-04-25 09:13:42 +02:00
parent de5d40ba98
commit 18c5609ea0
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2010-04-25 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-as-latex): Make sure that the
result buffer is in latex-mode.
* org.el (org-shiftup-final-hook, org-shiftdown-final-hook)
(org-shiftleft-final-hook, org-shiftright-final-hook): New
hooks.

View File

@ -793,7 +793,9 @@ when PUB-DIR is set, use this as the publishing directory."
(replace-match "\n")))
(run-hooks 'org-export-latex-final-hook)
(or to-buffer (save-buffer))
(if to-buffer
(unless (eq major-mode 'latex-mode) (latex-mode))
(save-buffer))
(org-export-latex-fix-inputenc)
(run-hooks 'org-export-latex-after-save-hook)
(goto-char (point-min))