From d346b2b4c70b5b1c1f612c715d0c1a4ec18458e0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 21 Aug 2012 00:08:50 -0700 Subject: 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. --- lisp/calendar/cal-tex.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lisp/calendar/cal-tex.el') 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 -- cgit v1.2.1