summaryrefslogtreecommitdiff
path: root/lisp/calendar/cal-tex.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-08-21 00:08:50 -0700
committerGlenn Morris <rgm@gnu.org>2012-08-21 00:08:50 -0700
commitd346b2b4c70b5b1c1f612c715d0c1a4ec18458e0 (patch)
tree84f87bfe73ffbc9fbdf00fcdd20c4656a1b8e0f8 /lisp/calendar/cal-tex.el
parent2d225a3a99c155e47043a4fa1f3b011e0a78a4cb (diff)
downloademacs-d346b2b4c70b5b1c1f612c715d0c1a4ec18458e0.tar.gz
Allow multiple cal-tex-buffer buffers to exist
* lisp/calendar/cal-tex.el (cal-tex-preamble): Generate new buffers. (cal-tex-end-document): Don't rely on buffer name.
Diffstat (limited to 'lisp/calendar/cal-tex.el')
-rw-r--r--lisp/calendar/cal-tex.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index 5fbb20bac3b..d891c9e639c 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -253,8 +253,7 @@ This definition is the heart of the calendar!")
"Insert the LaTeX calendar preamble into `cal-tex-buffer'.
Preamble includes initial definitions for various LaTeX commands.
Optional string ARGS are included as options for the article document class."
- ;; FIXME use generate-new-buffer, and adjust cal-tex-end-document.
- (set-buffer (get-buffer-create cal-tex-buffer))
+ (set-buffer (generate-new-buffer cal-tex-buffer))
(insert (format "\\documentclass%s{article}\n"
(if (stringp args)
(format "[%s]" args)
@@ -1712,7 +1711,7 @@ informative header, and run HOOK."
;; FIXME latin1 might not always be right.
(insert "\\usepackage[latin1]{inputenc}\n"))))
(latex-mode)
- (pop-to-buffer cal-tex-buffer)
+ (pop-to-buffer (current-buffer))
(goto-char (point-min))
;; FIXME auctex equivalents?
(cal-tex-comment