comparison lisp/progmodes/compile.el @ 8522:593457877265

(compilation-set-window-height): Add save-excursion.
author Richard M. Stallman <rms@gnu.org>
date Thu, 11 Aug 1994 21:45:47 +0000
parents 19dbc8373bec
children 0d1aada57ac9
comparison
equal deleted inserted replaced
8521:340ebdb14a0e 8522:593457877265
404 (and compilation-window-height 404 (and compilation-window-height
405 (= (window-width window) (frame-width (window-frame window))) 405 (= (window-width window) (frame-width (window-frame window)))
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)))
419 (define-key map [mouse-2] 'compile-mouse-goto-error) 422 (define-key map [mouse-2] 'compile-mouse-goto-error)
420 (define-key map "\C-c\C-c" 'compile-goto-error) 423 (define-key map "\C-c\C-c" 'compile-goto-error)