summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-10-31 23:50:02 +0000
committerRichard M. Stallman <rms@gnu.org>1996-10-31 23:50:02 +0000
commit23b642258082eabd10b393e93b2546dec0050947 (patch)
treeb48d91c462f1f638f49061d1ebb14c797c3ad181
parent49feb47da577b6d2046578ad962f717ede66651b (diff)
downloademacs-23b642258082eabd10b393e93b2546dec0050947.tar.gz
(tex-file): Fix paren error in last change.
(tex-recenter-output-buffer): Switch windows in a more controlled fashion, using save-selected-window.
-rw-r--r--lisp/textmodes/tex-mode.el26
1 files changed, 14 insertions, 12 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 953073d2833..4f19edcdc2f 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1063,10 +1063,10 @@ This function is more useful than \\[tex-buffer] when you need the
(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 @@ The last line of the buffer is displayed on
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].