changeset 16493:bdca7f3626c0

(tex-file): Fix paren error in last change. (tex-recenter-output-buffer): Switch windows in a more controlled fashion, using save-selected-window.
author Richard M. Stallman <rms@gnu.org>
date Thu, 31 Oct 1996 23:50:02 +0000
parents 2ddccd78c6b0
children 3f971c7163fb
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 14 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Thu Oct 31 22:06:32 1996 +0000
+++ b/lisp/textmodes/tex-mode.el	Thu Oct 31 23:50:02 1996 +0000
@@ -1063,10 +1063,10 @@
         (tex-kill-job)
       (tex-start-shell))
     (tex-send-command tex-shell-cd-command file-dir)
-    (tex-send-command tex-command source-file))
-  (tex-display-shell)
-  (setq tex-last-buffer-texed (current-buffer))
-  (setq tex-print-file source-file))
+    (tex-send-command tex-command source-file)
+    (tex-display-shell)
+    (setq tex-last-buffer-texed (current-buffer))
+    (setq tex-print-file source-file)))
 
 (defun tex-generate-zap-file-name ()
   "Generate a unique name suitable for use as a file name."
@@ -1108,16 +1108,18 @@
 line LINE of the window, or centered if LINE is nil."
   (interactive "P")
   (let ((tex-shell (get-buffer "*tex-shell*"))
-	(old-buffer (current-buffer)))
+	(old-buffer (current-buffer))
+	(window))
     (if (null tex-shell)
 	(message "No TeX output buffer")
-      (pop-to-buffer tex-shell)
-      (bury-buffer tex-shell)
-      (goto-char (point-max))
-      (recenter (if linenum
-		    (prefix-numeric-value linenum)
-		  (/ (window-height) 2)))
-      (pop-to-buffer old-buffer))))
+      (setq window (display-buffer tex-shell))
+      (save-selected-window
+	(select-window window)
+	(bury-buffer tex-shell)
+	(goto-char (point-max))
+	(recenter (if linenum
+		      (prefix-numeric-value linenum)
+		    (/ (window-height) 2)))))))
 
 (defun tex-print (&optional alt)
   "Print the .dvi file made by \\[tex-region], \\[tex-buffer] or \\[tex-file].