33 |
"Return number of lines in window WINDOW for actual buffer text. |
"Return number of lines in window WINDOW for actual buffer text. |
34 |
This does not include the mode line (if any) or the header line (if any)." |
This does not include the mode line (if any) or the header line (if any)." |
35 |
(or window (setq window (selected-window))) |
(or window (setq window (selected-window))) |
36 |
(with-current-buffer (window-buffer window) |
(if (window-minibuffer-p window) |
37 |
(- (window-height window) |
(window-height window) |
38 |
(if mode-line-format 1 0) |
(with-current-buffer (window-buffer window) |
39 |
(if header-line-format 1 0)))) |
(max 1 (- (window-height window) |
40 |
|
(if mode-line-format 1 0) |
41 |
|
(if header-line-format 1 0)))))) |
42 |
|
|
43 |
(defun one-window-p (&optional nomini all-frames) |
(defun one-window-p (&optional nomini all-frames) |
44 |
"Return non-nil if the selected window is the only window (in its frame). |
"Return non-nil if the selected window is the only window (in its frame). |