aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2013-04-15 10:27:56 +0300
committerEli Zaretskii2013-04-15 10:27:56 +0300
commitfd16b54c7242d59f78b4cf150432314f0bb5f583 (patch)
tree1272660cfceca67c9adbeb0e615765beb455a2ac /src
parent35c5bbbad00618df4d4d738bbd6b6ea9023922eb (diff)
downloademacs-fd16b54c7242d59f78b4cf150432314f0bb5f583.tar.gz
emacs-fd16b54c7242d59f78b4cf150432314f0bb5f583.zip
More debugging code to investigate bug #14062.
src/w32fns.c (w32_wnd_proc): Add more assertions to investigate bug#14062. src/frame.h (WINDOW_FRAME): Protect macro and its argument with parentheses. src/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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/dispextern.h24
-rw-r--r--src/frame.h2
-rw-r--r--src/w32fns.c2
4 files changed, 28 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5c0e26760c7..1d113260478 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
12013-04-15 Eli Zaretskii <eliz@gnu.org>
2
3 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
4 bug#14205.
5
6 * frame.h (WINDOW_FRAME): Protect macro and its argument with
7 parentheses.
8
9 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
10 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
11 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
12 parentheses where appropriate.
13
12013-04-14 Paul Eggert <eggert@cs.ucla.edu> 142013-04-14 Paul Eggert <eggert@cs.ucla.edu>
2 15
3 * keyboard.c (timer_start_idle): Remove no-longer-used local. 16 * keyboard.c (timer_start_idle): Remove no-longer-used local.
diff --git a/src/dispextern.h b/src/dispextern.h
index cb2e944d1cc..9dc3a57c284 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1384,7 +1384,7 @@ struct glyph_string
1384 ? current_mode_line_height \ 1384 ? current_mode_line_height \
1385 : (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ 1385 : (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
1386 ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ 1386 ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
1387 : estimate_mode_line_height (XFRAME (W->frame), \ 1387 : estimate_mode_line_height (XFRAME ((W)->frame), \
1388 CURRENT_MODE_LINE_FACE_ID (W)))) 1388 CURRENT_MODE_LINE_FACE_ID (W))))
1389 1389
1390/* Return the current height of the header line of window W. If not 1390/* Return the current height of the header line of window W. If not
@@ -1397,7 +1397,7 @@ struct glyph_string
1397 ? current_header_line_height \ 1397 ? current_header_line_height \
1398 : (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ 1398 : (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
1399 ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ 1399 ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
1400 : estimate_mode_line_height (XFRAME (W->frame),\ 1400 : estimate_mode_line_height (XFRAME ((W)->frame), \
1401 HEADER_LINE_FACE_ID))) 1401 HEADER_LINE_FACE_ID)))
1402 1402
1403/* Return the height of the desired mode line of window W. */ 1403/* Return the height of the desired mode line of window W. */
@@ -1416,20 +1416,20 @@ struct glyph_string
1416 (!MINI_WINDOW_P ((W)) \ 1416 (!MINI_WINDOW_P ((W)) \
1417 && !(W)->pseudo_window_p \ 1417 && !(W)->pseudo_window_p \
1418 && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \ 1418 && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
1419 && BUFFERP (W->contents) \ 1419 && BUFFERP ((W)->contents) \
1420 && !NILP (BVAR (XBUFFER (W->contents), mode_line_format)) \ 1420 && !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)) \
1421 && WINDOW_TOTAL_LINES (W) > 1) 1421 && WINDOW_TOTAL_LINES (W) > 1)
1422 1422
1423/* Value is true if window W wants a header line. */ 1423/* Value is true if window W wants a header line. */
1424 1424
1425#define WINDOW_WANTS_HEADER_LINE_P(W) \ 1425#define WINDOW_WANTS_HEADER_LINE_P(W) \
1426 (!MINI_WINDOW_P ((W)) \ 1426 (!MINI_WINDOW_P ((W)) \
1427 && !(W)->pseudo_window_p \ 1427 && !(W)->pseudo_window_p \
1428 && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \ 1428 && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
1429 && BUFFERP (W->contents) \ 1429 && BUFFERP ((W)->contents) \
1430 && !NILP (BVAR (XBUFFER (W->contents), header_line_format)) \ 1430 && !NILP (BVAR (XBUFFER ((W)->contents), header_line_format)) \
1431 && WINDOW_TOTAL_LINES (W) > 1 \ 1431 && WINDOW_TOTAL_LINES (W) > 1 \
1432 + !NILP (BVAR (XBUFFER (W->contents), mode_line_format))) 1432 + !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)))
1433 1433
1434/* Return proper value to be used as baseline offset of font that has 1434/* Return proper value to be used as baseline offset of font that has
1435 ASCENT and DESCENT to draw characters by the font at the vertical 1435 ASCENT and DESCENT to draw characters by the font at the vertical
diff --git a/src/frame.h b/src/frame.h
index b69f19b7ef8..fc0a1dc828b 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -598,7 +598,7 @@ typedef struct frame *FRAME_PTR;
598#define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME)) 598#define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
599 599
600/* Given a window, return its frame as a Lisp_Object. */ 600/* Given a window, return its frame as a Lisp_Object. */
601#define WINDOW_FRAME(w) w->frame 601#define WINDOW_FRAME(w) ((w)->frame)
602 602
603/* Test a frame for particular kinds of display methods. */ 603/* Test a frame for particular kinds of display methods. */
604#define FRAME_INITIAL_P(f) ((f)->output_method == output_initial) 604#define FRAME_INITIAL_P(f) ((f)->output_method == output_initial)
diff --git a/src/w32fns.c b/src/w32fns.c
index 5d3a78f8b95..de52ff144e3 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -3123,6 +3123,8 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
3123 3123
3124#ifdef ENABLE_CHECKING 3124#ifdef ENABLE_CHECKING
3125 /* Temporary code to catch crashes in computing form.rcArea.top. */ 3125 /* Temporary code to catch crashes in computing form.rcArea.top. */
3126 eassert (FRAMEP (w->frame));
3127 eassert (BUFFERP (w->contents));
3126 { 3128 {
3127 int wmbp = WINDOW_MENU_BAR_P (w); 3129 int wmbp = WINDOW_MENU_BAR_P (w);
3128 int wtbp = WINDOW_TOOL_BAR_P (w); 3130 int wtbp = WINDOW_TOOL_BAR_P (w);