((ROW)->height != (ROW)->visible_height)
#define MR_PARTIALLY_VISIBLE_AT_TOP(W, ROW) \
- ((ROW)->y < (WINDOW_TAB_LINE_HEIGHT ((W)) + WINDOW_HEADER_LINE_HEIGHT ((W))))
+ ((ROW)->y < WINDOW_TAB_LINE_HEIGHT (W) + WINDOW_HEADER_LINE_HEIGHT (W))
#define MR_PARTIALLY_VISIBLE_AT_BOTTOM(W, ROW) \
(((ROW)->y + (ROW)->height - (ROW)->extra_line_spacing) \
a default based on the height of the font of the face `mode-line'. */
#define CURRENT_MODE_LINE_HEIGHT(W) \
- (W->mode_line_height >= 0 \
- ? W->mode_line_height \
- : (W->mode_line_height \
- = (MATRIX_MODE_LINE_HEIGHT (W->current_matrix) \
- ? MATRIX_MODE_LINE_HEIGHT (W->current_matrix) \
+ ((W)->mode_line_height >= 0 \
+ ? (W)->mode_line_height \
+ : ((W)->mode_line_height \
+ = (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
+ ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
: estimate_mode_line_height \
- (XFRAME (W->frame), CURRENT_MODE_LINE_FACE_ID (W)))))
+ (XFRAME ((W)->frame), CURRENT_MODE_LINE_FACE_ID (W)))))
/* Return the current height of the header line of window W. If not known
from W->header_line_height, look at W's current glyph matrix, or return
an estimation based on the height of the font of the face `header-line'. */
#define CURRENT_HEADER_LINE_HEIGHT(W) \
- (W->header_line_height >= 0 \
- ? W->header_line_height \
- : (W->header_line_height \
- = (MATRIX_HEADER_LINE_HEIGHT (W->current_matrix) \
- ? MATRIX_HEADER_LINE_HEIGHT (W->current_matrix) \
+ ((W)->header_line_height >= 0 \
+ ? (W)->header_line_height \
+ : ((W)->header_line_height \
+ = (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
+ ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
: estimate_mode_line_height \
- (XFRAME (W->frame), HEADER_LINE_FACE_ID))))
+ (XFRAME ((W)->frame), HEADER_LINE_FACE_ID))))
/* Return the current height of the tab line of window W. If not known
from W->tab_line_height, look at W's current glyph matrix, or return
an estimation based on the height of the font of the face `tab-line'. */
#define CURRENT_TAB_LINE_HEIGHT(W) \
- (W->tab_line_height >= 0 \
- ? W->tab_line_height \
- : (W->tab_line_height \
- = (MATRIX_TAB_LINE_HEIGHT (W->current_matrix) \
- ? MATRIX_TAB_LINE_HEIGHT (W->current_matrix) \
+ ((W)->tab_line_height >= 0 \
+ ? (W)->tab_line_height \
+ : ((W)->tab_line_height \
+ = (MATRIX_TAB_LINE_HEIGHT ((W)->current_matrix) \
+ ? MATRIX_TAB_LINE_HEIGHT ((W)->current_matrix) \
: estimate_mode_line_height \
- (XFRAME (W->frame), TAB_LINE_FACE_ID))))
+ (XFRAME ((W)->frame), TAB_LINE_FACE_ID))))
/* Return the height of the desired mode line of window W. */
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_fixnum (WINDOW_MODE_LINE_HEIGHT (decode_live_window (window))));
+ return make_fixnum (WINDOW_MODE_LINE_HEIGHT (decode_live_window (window)));
}
DEFUN ("window-header-line-height", Fwindow_header_line_height,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_fixnum (WINDOW_HEADER_LINE_HEIGHT (decode_live_window (window))));
+ return make_fixnum (WINDOW_HEADER_LINE_HEIGHT (decode_live_window (window)));
}
DEFUN ("window-tab-line-height", Fwindow_tab_line_height,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_fixnum (WINDOW_TAB_LINE_HEIGHT (decode_live_window (window))));
+ return make_fixnum (WINDOW_TAB_LINE_HEIGHT (decode_live_window (window)));
}
DEFUN ("window-right-divider-width", Fwindow_right_divider_width,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_fixnum (WINDOW_RIGHT_DIVIDER_WIDTH (decode_live_window (window))));
+ return make_fixnum (WINDOW_RIGHT_DIVIDER_WIDTH (decode_live_window (window)));
}
DEFUN ("window-bottom-divider-width", Fwindow_bottom_divider_width,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_fixnum (WINDOW_BOTTOM_DIVIDER_WIDTH (decode_live_window (window))));
+ return make_fixnum (WINDOW_BOTTOM_DIVIDER_WIDTH (decode_live_window (window)));
}
DEFUN ("window-scroll-bar-width", Fwindow_scroll_bar_width,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_fixnum (WINDOW_SCROLL_BAR_AREA_WIDTH (decode_live_window (window))));
+ return make_fixnum (WINDOW_SCROLL_BAR_AREA_WIDTH (decode_live_window (window)));
}
DEFUN ("window-scroll-bar-height", Fwindow_scroll_bar_height,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_fixnum (WINDOW_SCROLL_BAR_AREA_HEIGHT (decode_live_window (window))));
+ return make_fixnum (WINDOW_SCROLL_BAR_AREA_HEIGHT (decode_live_window (window)));
}
DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0,
hardcodes the values of `window-safe-min-width' (2) and
`window-safe-min-height' (1) which are defined in window.el. */
return (XFIXNUM (w->new_pixel) >= (horflag
- ? (2 * FRAME_COLUMN_WIDTH (f))
- : FRAME_LINE_HEIGHT (f)));
+ ? 2 * FRAME_COLUMN_WIDTH (f)
+ : FRAME_LINE_HEIGHT (f)));
}
Lisp_Object window_mode_line_format =
window_parameter (w, Qmode_line_format);
- return ((WINDOW_LEAF_P (w)
- && !MINI_WINDOW_P (w)
- && !WINDOW_PSEUDO_P (w)
- && !EQ (window_mode_line_format, Qnone)
- && (!NILP (window_mode_line_format)
- || !NILP (BVAR (XBUFFER (WINDOW_BUFFER (w)), mode_line_format)))
- && WINDOW_PIXEL_HEIGHT (w) > WINDOW_FRAME_LINE_HEIGHT (w))
- ? 1
- : 0);
+ return (WINDOW_LEAF_P (w)
+ && !MINI_WINDOW_P (w)
+ && !WINDOW_PSEUDO_P (w)
+ && !EQ (window_mode_line_format, Qnone)
+ && (!NILP (window_mode_line_format)
+ || !NILP (BVAR (XBUFFER (WINDOW_BUFFER (w)), mode_line_format)))
+ && WINDOW_PIXEL_HEIGHT (w) > WINDOW_FRAME_LINE_HEIGHT (w));
}
Lisp_Object window_header_line_format =
window_parameter (w, Qheader_line_format);
- return ((WINDOW_LEAF_P (w)
- && !MINI_WINDOW_P (w)
- && !WINDOW_PSEUDO_P (w)
- && !EQ (window_header_line_format, Qnone)
- && (!NILP (window_header_line_format)
- || !NILP (BVAR (XBUFFER (WINDOW_BUFFER (w)), header_line_format)))
- && (WINDOW_PIXEL_HEIGHT (w)
- > (window_wants_mode_line (w)
- ? 2 * WINDOW_FRAME_LINE_HEIGHT (w)
- : WINDOW_FRAME_LINE_HEIGHT (w))))
- ? 1
- : 0);
+ return (WINDOW_LEAF_P (w)
+ && !MINI_WINDOW_P (w)
+ && !WINDOW_PSEUDO_P (w)
+ && !EQ (window_header_line_format, Qnone)
+ && (!NILP (window_header_line_format)
+ || !NILP (BVAR (XBUFFER (WINDOW_BUFFER (w)), header_line_format)))
+ && (WINDOW_PIXEL_HEIGHT (w)
+ > (window_wants_mode_line (w)
+ ? 2 * WINDOW_FRAME_LINE_HEIGHT (w)
+ : WINDOW_FRAME_LINE_HEIGHT (w))));
}
* to accommodate a mode line and a header line too if necessary (the
* mode line and a header line prevail).
*/
+
bool
window_wants_tab_line (struct window *w)
{
Lisp_Object window_tab_line_format =
window_parameter (w, Qtab_line_format);
- return ((WINDOW_LEAF_P (w)
- && !MINI_WINDOW_P (w)
- && !WINDOW_PSEUDO_P (w)
- && !EQ (window_tab_line_format, Qnone)
- && (!NILP (window_tab_line_format)
- || !NILP (BVAR (XBUFFER (WINDOW_BUFFER (w)), tab_line_format)))
- && (WINDOW_PIXEL_HEIGHT (w)
- > (((window_wants_mode_line (w) ? 1 : 0)
- + (window_wants_header_line (w) ? 1 : 0)
- + 1) * WINDOW_FRAME_LINE_HEIGHT (w))))
- ? 1
- : 0);
+ return (WINDOW_LEAF_P (w)
+ && !MINI_WINDOW_P (w)
+ && !WINDOW_PSEUDO_P (w)
+ && !EQ (window_tab_line_format, Qnone)
+ && (!NILP (window_tab_line_format)
+ || !NILP (BVAR (XBUFFER (WINDOW_BUFFER (w)), tab_line_format)))
+ && (WINDOW_PIXEL_HEIGHT (w)
+ > (((window_wants_mode_line (w) ? 1 : 0)
+ + (window_wants_header_line (w) ? 1 : 0)
+ + 1) * WINDOW_FRAME_LINE_HEIGHT (w))));
}
/* Return number of lines of text in window W, not counting the mode
minibuf_selected_window = data->minibuf_selected_window;
SAFE_FREE ();
- return (FRAME_LIVE_P (f) ? Qt : Qnil);
+ return FRAME_LIVE_P (f) ? Qt : Qnil;
}
ASET (tem, i, make_nil_vector (VECSIZE (struct saved_window)));
save_window_save (FRAME_ROOT_WINDOW (f), XVECTOR (tem), 0);
XSETWINDOW_CONFIGURATION (tem, data);
- return (tem);
+ return tem;
}
/* Called after W's margins, fringes or scroll bars was adjusted. */