comparison lisp/progmodes/compile.el @ 78465:b8c25f200566

(compilation-set-window-height): Use window-full-width-p instead of comparing frame-width and window-width. (compilation-find-buffer): Remove extra argument in call to compilation-buffer-internal-p.
author Martin Rudalics <rudalics@gmx.at>
date Wed, 08 Aug 2007 05:57:54 +0000
parents b589cafd502b
children be466566559a e5a68f18fcb9
comparison
equal deleted inserted replaced
78464:7819402a9963 78465:b8c25f200566
1151 1151
1152 (defun compilation-set-window-height (window) 1152 (defun compilation-set-window-height (window)
1153 "Set the height of WINDOW according to `compilation-window-height'." 1153 "Set the height of WINDOW according to `compilation-window-height'."
1154 (let ((height (buffer-local-value 'compilation-window-height (window-buffer window)))) 1154 (let ((height (buffer-local-value 'compilation-window-height (window-buffer window))))
1155 (and height 1155 (and height
1156 (= (window-width window) (frame-width (window-frame window))) 1156 (window-full-width-p window)
1157 ;; If window is alone in its frame, aside from a minibuffer, 1157 ;; If window is alone in its frame, aside from a minibuffer,
1158 ;; don't change its height. 1158 ;; don't change its height.
1159 (not (eq window (frame-root-window (window-frame window)))) 1159 (not (eq window (frame-root-window (window-frame window))))
1160 ;; Stef said that doing the saves in this order is safer: 1160 ;; Stef said that doing the saves in this order is safer:
1161 (save-excursion 1161 (save-excursion
1609 (setq compilation-current-error (point)) 1609 (setq compilation-current-error (point))
1610 (next-error-internal))) 1610 (next-error-internal)))
1611 1611
1612 (defun compilation-find-buffer (&optional avoid-current) 1612 (defun compilation-find-buffer (&optional avoid-current)
1613 "Return a compilation buffer. 1613 "Return a compilation buffer.
1614 If AVOID-CURRENT is nil, and 1614 If AVOID-CURRENT is nil, and the current buffer is a compilation buffer,
1615 the current buffer is a compilation buffer, return it. 1615 return it. If AVOID-CURRENT is non-nil, return the current buffer only
1616 If AVOID-CURRENT is non-nil, return the current buffer 1616 as a last resort."
1617 only as a last resort." 1617 (if (and (compilation-buffer-internal-p) (not avoid-current))
1618 (if (and (compilation-buffer-internal-p (current-buffer))
1619 (not avoid-current))
1620 (current-buffer) 1618 (current-buffer)
1621 (next-error-find-buffer avoid-current 'compilation-buffer-internal-p))) 1619 (next-error-find-buffer avoid-current 'compilation-buffer-internal-p)))
1622 1620
1623 ;;;###autoload 1621 ;;;###autoload
1624 (defun compilation-next-error-function (n &optional reset) 1622 (defun compilation-next-error-function (n &optional reset)