+2013-04-15 Eli Zaretskii <eliz@gnu.org>
+
+ * w32fns.c (w32_wnd_proc): Add more assertions to investigate
+ bug#14205.
+
+ * frame.h (WINDOW_FRAME): Protect macro and its argument with
+ parentheses.
+
+ * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
+ (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
+ (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
+ parentheses where appropriate.
+
2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
* keyboard.c (timer_start_idle): Remove no-longer-used local.
? current_mode_line_height \
: (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
- : estimate_mode_line_height (XFRAME (W->frame), \
+ : estimate_mode_line_height (XFRAME ((W)->frame), \
CURRENT_MODE_LINE_FACE_ID (W))))
/* Return the current height of the header line of window W. If not
? current_header_line_height \
: (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
- : estimate_mode_line_height (XFRAME (W->frame),\
+ : estimate_mode_line_height (XFRAME ((W)->frame), \
HEADER_LINE_FACE_ID)))
/* Return the height of the desired mode line of window W. */
(!MINI_WINDOW_P ((W)) \
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
- && BUFFERP (W->contents) \
- && !NILP (BVAR (XBUFFER (W->contents), mode_line_format)) \
+ && BUFFERP ((W)->contents) \
+ && !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1)
/* Value is true if window W wants a header line. */
-#define WINDOW_WANTS_HEADER_LINE_P(W) \
- (!MINI_WINDOW_P ((W)) \
- && !(W)->pseudo_window_p \
- && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
- && BUFFERP (W->contents) \
- && !NILP (BVAR (XBUFFER (W->contents), header_line_format)) \
- && WINDOW_TOTAL_LINES (W) > 1 \
- + !NILP (BVAR (XBUFFER (W->contents), mode_line_format)))
+#define WINDOW_WANTS_HEADER_LINE_P(W) \
+ (!MINI_WINDOW_P ((W)) \
+ && !(W)->pseudo_window_p \
+ && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
+ && BUFFERP ((W)->contents) \
+ && !NILP (BVAR (XBUFFER ((W)->contents), header_line_format)) \
+ && WINDOW_TOTAL_LINES (W) > 1 \
+ + !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)))
/* Return proper value to be used as baseline offset of font that has
ASCENT and DESCENT to draw characters by the font at the vertical
#define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
/* Given a window, return its frame as a Lisp_Object. */
-#define WINDOW_FRAME(w) w->frame
+#define WINDOW_FRAME(w) ((w)->frame)
/* Test a frame for particular kinds of display methods. */
#define FRAME_INITIAL_P(f) ((f)->output_method == output_initial)