1 |
;;; compile.el --- run compiler as inferior of Emacs, parse error messages |
;;; compile.el --- run compiler as inferior of Emacs, parse error messages |
2 |
|
|
3 |
;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001 |
;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001, 2003 |
4 |
;; Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Roland McGrath <roland@gnu.org> |
;; Author: Roland McGrath <roland@gnu.org> |
1051 |
(goto-char (point-max))) |
(goto-char (point-max))) |
1052 |
;; Pop up the compilation buffer. |
;; Pop up the compilation buffer. |
1053 |
(setq outwin (display-buffer outbuf nil t)) |
(setq outwin (display-buffer outbuf nil t)) |
1054 |
(save-excursion |
(with-current-buffer outbuf |
|
(set-buffer outbuf) |
|
1055 |
(compilation-mode name-of-mode) |
(compilation-mode name-of-mode) |
1056 |
;; In what way is it non-ergonomic ? -stef |
;; In what way is it non-ergonomic ? -stef |
1057 |
;; (toggle-read-only 1) ;;; Non-ergonomic. |
;; (toggle-read-only 1) ;;; Non-ergonomic. |
1143 |
;; If window is alone in its frame, aside from a minibuffer, |
;; If window is alone in its frame, aside from a minibuffer, |
1144 |
;; don't change its height. |
;; don't change its height. |
1145 |
(not (eq window (frame-root-window (window-frame window)))) |
(not (eq window (frame-root-window (window-frame window)))) |
1146 |
;; This save-excursion prevents us from changing the current buffer, |
;; This save-current-buffer prevents us from changing the current |
1147 |
;; which might not be the same as the selected window's buffer. |
;; buffer, which might not be the same as the selected window's buffer. |
1148 |
(save-excursion |
(save-current-buffer |
1149 |
(let ((w (selected-window))) |
(save-selected-window |
1150 |
(unwind-protect |
(select-window window) |
1151 |
(progn |
(enlarge-window (- compilation-window-height |
1152 |
(select-window window) |
(window-height))))))) |
|
(enlarge-window (- compilation-window-height |
|
|
(window-height)))) |
|
|
;; The enlarge-window above may have deleted W, if |
|
|
;; compilation-window-height is large enough. |
|
|
(when (window-live-p w) |
|
|
(select-window w))))))) |
|
1153 |
|
|
1154 |
(defvar compilation-menu-map |
(defvar compilation-menu-map |
1155 |
(let ((map (make-sparse-keymap "Errors"))) |
(let ((map (make-sparse-keymap "Errors"))) |