mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(compilation-set-window-height): Add save-excursion.
This commit is contained in:
parent
86e58378af
commit
8205cbfc8f
1 changed files with 10 additions and 7 deletions
|
|
@ -406,13 +406,16 @@ Returns the compilation buffer created."
|
|||
;; If window is alone in its frame, aside from a minibuffer,
|
||||
;; don't change its height.
|
||||
(not (eq window (frame-root-window (window-frame window))))
|
||||
(let ((w (selected-window)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(select-window window)
|
||||
(enlarge-window (- compilation-window-height
|
||||
(window-height))))
|
||||
(select-window w)))))
|
||||
;; This save-excursion prevents us from changing the current buffer,
|
||||
;; which might not be the same as the selected window's buffer.
|
||||
(save-excursion
|
||||
(let ((w (selected-window)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(select-window window)
|
||||
(enlarge-window (- compilation-window-height
|
||||
(window-height))))
|
||||
(select-window w))))))
|
||||
|
||||
(defvar compilation-minor-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue