Commit 088d0d61 authored by Glenn Morris's avatar Glenn Morris
Browse files

Small cal-tex fix.

* lisp/calendar/cal-tex.el (cal-tex-end-document):
Try to automatically use latin1 input if needed.
parent c0749a51
2011-04-12 Glenn Morris <rgm@gnu.org>
* calendar/cal-tex.el (cal-tex-end-document):
Try to automatically use latin1 input if needed.
* calendar/cal-hebrew.el (diary-hebrew-rosh-hodesh):
Don't try to cons a mark onto an empty element.
......
......@@ -1587,6 +1587,16 @@ FINAL-SEPARATOR is non-nil."
Insert the trailer to LaTeX document, pop to LaTeX buffer, add
informative header, and run HOOK."
(cal-tex-e-document)
(or (and cal-tex-preamble-extra
(string-match "inputenc" cal-tex-preamble-extra))
(not (re-search-backward "[^[:ascii:]]" nil 'move))
(progn
(goto-char (point-min))
(when (search-forward "documentclass" nil t)
(forward-line 1)
;; Eg for some Bahai holidays.
;; FIXME latin1 might not always be right.
(insert "\\usepackage[latin1]{inputenc}\n"))))
(latex-mode)
(pop-to-buffer cal-tex-buffer)
(goto-char (point-min))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment