diff options
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r-- | lisp/progmodes/compile.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index da4d398ec2..9faba001c3 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -937,7 +937,10 @@ exited abnormally with code %d\n" (select-window window) (enlarge-window (- compilation-window-height (window-height)))) - (select-window w)))))) + ;; The enlarge-window above may have deleted W, if + ;; compilation-window-height is large enough. + (when (window-live-p w) + (select-window w))))))) (defvar compilation-minor-mode-map (let ((map (make-sparse-keymap))) |