aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-08-11 21:45:47 +0000
committerRichard M. Stallman1994-08-11 21:45:47 +0000
commit8205cbfc8f855e6d096636deb7965f485696bb23 (patch)
treeefcd13efd4d1014dd2b5907e4af2379d3f6d7d60
parent86e58378af08663d10166252ed1c54a70564c351 (diff)
downloademacs-8205cbfc8f855e6d096636deb7965f485696bb23.tar.gz
emacs-8205cbfc8f855e6d096636deb7965f485696bb23.zip
(compilation-set-window-height): Add save-excursion.
-rw-r--r--lisp/progmodes/compile.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 7ecc68aa5be..3c465702ac8 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -406,13 +406,16 @@ Returns the compilation buffer created."
406 ;; If window is alone in its frame, aside from a minibuffer, 406 ;; If window is alone in its frame, aside from a minibuffer,
407 ;; don't change its height. 407 ;; don't change its height.
408 (not (eq window (frame-root-window (window-frame window)))) 408 (not (eq window (frame-root-window (window-frame window))))
409 (let ((w (selected-window))) 409 ;; This save-excursion prevents us from changing the current buffer,
410 (unwind-protect 410 ;; which might not be the same as the selected window's buffer.
411 (progn 411 (save-excursion
412 (select-window window) 412 (let ((w (selected-window)))
413 (enlarge-window (- compilation-window-height 413 (unwind-protect
414 (window-height)))) 414 (progn
415 (select-window w))))) 415 (select-window window)
416 (enlarge-window (- compilation-window-height
417 (window-height))))
418 (select-window w))))))
416 419
417(defvar compilation-minor-mode-map 420(defvar compilation-minor-mode-map
418 (let ((map (make-sparse-keymap))) 421 (let ((map (make-sparse-keymap)))