aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-05 16:39:19 +0000
committerGerd Moellmann1999-09-05 16:39:19 +0000
commit045dee35ff74932bbaa0d603bd6f0b4e51a6fbd0 (patch)
treed30d50ac8f82d4994290a9fb87eb34816f563fc6 /src
parente5e7779fb41613580088a4819264cc10a0eea230 (diff)
downloademacs-045dee35ff74932bbaa0d603bd6f0b4e51a6fbd0.tar.gz
emacs-045dee35ff74932bbaa0d603bd6f0b4e51a6fbd0.zip
Change
`top-line' and `top_line' to `header-line' and `header_line'. Likewise for similar spellings.
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c15
-rw-r--r--src/buffer.h2
-rw-r--r--src/dispextern.h38
-rw-r--r--src/dispnew.c42
-rw-r--r--src/keyboard.c8
-rw-r--r--src/keyboard.h2
-rw-r--r--src/window.c10
-rw-r--r--src/xdisp.c82
-rw-r--r--src/xfaces.c10
-rw-r--r--src/xterm.c26
10 files changed, 119 insertions, 116 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 5d2db83521e..d4c60f966cd 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -3850,7 +3850,7 @@ init_buffer_once ()
3850 3850
3851 /* real setup is done in loaddefs.el */ 3851 /* real setup is done in loaddefs.el */
3852 buffer_defaults.mode_line_format = build_string ("%-"); 3852 buffer_defaults.mode_line_format = build_string ("%-");
3853 buffer_defaults.top_line_format = Qnil; 3853 buffer_defaults.header_line_format = Qnil;
3854 buffer_defaults.abbrev_mode = Qnil; 3854 buffer_defaults.abbrev_mode = Qnil;
3855 buffer_defaults.overwrite_mode = Qnil; 3855 buffer_defaults.overwrite_mode = Qnil;
3856 buffer_defaults.case_fold_search = Qt; 3856 buffer_defaults.case_fold_search = Qt;
@@ -3949,7 +3949,7 @@ init_buffer_once ()
3949 XSETFASTINT (buffer_local_flags.indicate_empty_lines, 0x400000); 3949 XSETFASTINT (buffer_local_flags.indicate_empty_lines, 0x400000);
3950 XSETFASTINT (buffer_local_flags.scroll_up_aggressively, 0x800000); 3950 XSETFASTINT (buffer_local_flags.scroll_up_aggressively, 0x800000);
3951 XSETFASTINT (buffer_local_flags.scroll_down_aggressively, 0x1000000); 3951 XSETFASTINT (buffer_local_flags.scroll_down_aggressively, 0x1000000);
3952 XSETFASTINT (buffer_local_flags.top_line_format, 0x2000000); 3952 XSETFASTINT (buffer_local_flags.header_line_format, 0x2000000);
3953 3953
3954 Vbuffer_alist = Qnil; 3954 Vbuffer_alist = Qnil;
3955 current_buffer = 0; 3955 current_buffer = 0;
@@ -4097,10 +4097,10 @@ syms_of_buffer ()
4097 "Default value of `mode-line-format' for buffers that don't override it.\n\ 4097 "Default value of `mode-line-format' for buffers that don't override it.\n\
4098This is the same as (default-value 'mode-line-format)."); 4098This is the same as (default-value 'mode-line-format).");
4099 4099
4100 DEFVAR_LISP_NOPRO ("default-top-line-format", 4100 DEFVAR_LISP_NOPRO ("default-header-line-format",
4101 &buffer_defaults.top_line_format, 4101 &buffer_defaults.header_line_format,
4102 "Default value of `top-line-format' for buffers that don't override it.\n\ 4102 "Default value of `header-line-format' for buffers that don't override it.\n\
4103This is the same as (default-value 'top-line-format)."); 4103This is the same as (default-value 'header-line-format).");
4104 4104
4105 DEFVAR_LISP_NOPRO ("default-abbrev-mode", 4105 DEFVAR_LISP_NOPRO ("default-abbrev-mode",
4106 &buffer_defaults.abbrev_mode, 4106 &buffer_defaults.abbrev_mode,
@@ -4187,7 +4187,8 @@ don't override it. This is the same as (default-value\n\
4187don't override it. This is the same as (default-value\n\ 4187don't override it. This is the same as (default-value\n\
4188'scroll-down-aggressively)."); 4188'scroll-down-aggressively).");
4189 4189
4190 DEFVAR_PER_BUFFER ("top-line-format", &current_buffer->top_line_format, 4190 DEFVAR_PER_BUFFER ("header-line-format",
4191 &current_buffer->header_line_format,
4191 Qnil, 4192 Qnil,
4192 "Analogous to `mode-line-format', but for a mode line displayed\n\ 4193 "Analogous to `mode-line-format', but for a mode line displayed\n\
4193at the top of windows."); 4194at the top of windows.");
diff --git a/src/buffer.h b/src/buffer.h
index eab6d79aef9..377bc0aff8e 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -587,7 +587,7 @@ struct buffer
587 587
588 /* Analogous to mode_line_format for the line displayed at the top 588 /* Analogous to mode_line_format for the line displayed at the top
589 of windows. Nil means don't display that line. */ 589 of windows. Nil means don't display that line. */
590 Lisp_Object top_line_format; 590 Lisp_Object header_line_format;
591 591
592 /* Keys that are bound local to this buffer. */ 592 /* Keys that are bound local to this buffer. */
593 Lisp_Object keymap; 593 Lisp_Object keymap;
diff --git a/src/dispextern.h b/src/dispextern.h
index 622dc8a806b..009ac503f2a 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -461,7 +461,7 @@ struct glyph_matrix
461 461
462 /* Non-zero means window displayed in this matrix has a top mode 462 /* Non-zero means window displayed in this matrix has a top mode
463 line. */ 463 line. */
464 unsigned top_line_p : 1; 464 unsigned header_line_p : 1;
465 465
466#ifdef GLYPH_DEBUG 466#ifdef GLYPH_DEBUG
467 /* A string identifying the method used to display the matrix. */ 467 /* A string identifying the method used to display the matrix. */
@@ -674,7 +674,7 @@ struct glyph_row *matrix_row P_ ((struct glyph_matrix *, int));
674 This is always the first row in MATRIX because that's the only 674 This is always the first row in MATRIX because that's the only
675 way that works in frame-based redisplay. */ 675 way that works in frame-based redisplay. */
676 676
677#define MATRIX_TOP_LINE_ROW(MATRIX) (MATRIX)->rows 677#define MATRIX_HEADER_LINE_ROW(MATRIX) (MATRIX)->rows
678 678
679/* Return a pointer to first row in MATRIX used for text display. */ 679/* Return a pointer to first row in MATRIX used for text display. */
680 680
@@ -744,7 +744,7 @@ struct glyph_row *matrix_row P_ ((struct glyph_matrix *, int));
744 744
745#define MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P(W, ROW) \ 745#define MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P(W, ROW) \
746 (MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW)) \ 746 (MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW)) \
747 && (ROW)->y < WINDOW_DISPLAY_TOP_LINE_HEIGHT ((W))) 747 && (ROW)->y < WINDOW_DISPLAY_HEADER_LINE_HEIGHT ((W)))
748 748
749/* Non-zero if ROW is partially visible at the bottom of window W. */ 749/* Non-zero if ROW is partially visible at the bottom of window W. */
750 750
@@ -863,9 +863,9 @@ extern struct glyph_row scratch_glyph_row;
863 if not known. This macro is called under circumstances where 863 if not known. This macro is called under circumstances where
864 MATRIX might not have been allocated yet. */ 864 MATRIX might not have been allocated yet. */
865 865
866#define MATRIX_TOP_LINE_HEIGHT(MATRIX) \ 866#define MATRIX_HEADER_LINE_HEIGHT(MATRIX) \
867 ((MATRIX) && (MATRIX)->rows \ 867 ((MATRIX) && (MATRIX)->rows \
868 ? MATRIX_TOP_LINE_ROW (MATRIX)->height \ 868 ? MATRIX_HEADER_LINE_ROW (MATRIX)->height \
869 : 0) 869 : 0)
870 870
871/* Return the current height of the mode line of window W. If not 871/* Return the current height of the mode line of window W. If not
@@ -881,10 +881,10 @@ extern struct glyph_row scratch_glyph_row;
881 known from W's current glyph matrix, return an estimation based on 881 known from W's current glyph matrix, return an estimation based on
882 the height of the font of the face `top-line'. */ 882 the height of the font of the face `top-line'. */
883 883
884#define CURRENT_TOP_LINE_HEIGHT(W) \ 884#define CURRENT_HEADER_LINE_HEIGHT(W) \
885 (MATRIX_TOP_LINE_HEIGHT ((W)->current_matrix) \ 885 (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
886 ? MATRIX_TOP_LINE_HEIGHT ((W)->current_matrix) \ 886 ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
887 : estimate_mode_line_height (XFRAME ((W)->frame), TOP_LINE_FACE_ID)) 887 : estimate_mode_line_height (XFRAME ((W)->frame), HEADER_LINE_FACE_ID))
888 888
889/* Return the height of the desired mode line of window W. */ 889/* Return the height of the desired mode line of window W. */
890 890
@@ -893,8 +893,8 @@ extern struct glyph_row scratch_glyph_row;
893 893
894/* Return the height of the desired top line of window W. */ 894/* Return the height of the desired top line of window W. */
895 895
896#define DESIRED_TOP_LINE_HEIGHT(W) \ 896#define DESIRED_HEADER_LINE_HEIGHT(W) \
897 MATRIX_TOP_LINE_HEIGHT ((W)->desired_matrix) 897 MATRIX_HEADER_LINE_HEIGHT ((W)->desired_matrix)
898 898
899/* Like FRAME_INTERNAL_BORDER_WIDTH but checks whether frame F is a 899/* Like FRAME_INTERNAL_BORDER_WIDTH but checks whether frame F is a
900 window-system frame. */ 900 window-system frame. */
@@ -930,9 +930,9 @@ extern struct glyph_row scratch_glyph_row;
930/* Height in pixels of the top line. Zero if W doesn't have a top 930/* Height in pixels of the top line. Zero if W doesn't have a top
931 line. */ 931 line. */
932 932
933#define WINDOW_DISPLAY_TOP_LINE_HEIGHT(W) \ 933#define WINDOW_DISPLAY_HEADER_LINE_HEIGHT(W) \
934 (WINDOW_WANTS_TOP_LINE_P ((W)) \ 934 (WINDOW_WANTS_HEADER_LINE_P ((W)) \
935 ? CURRENT_TOP_LINE_HEIGHT (W) \ 935 ? CURRENT_HEADER_LINE_HEIGHT (W) \
936 : 0) 936 : 0)
937 937
938/* Pixel height of window W without mode line. */ 938/* Pixel height of window W without mode line. */
@@ -946,7 +946,7 @@ extern struct glyph_row scratch_glyph_row;
946#define WINDOW_DISPLAY_TEXT_HEIGHT(W) \ 946#define WINDOW_DISPLAY_TEXT_HEIGHT(W) \
947 (WINDOW_DISPLAY_PIXEL_HEIGHT ((W)) \ 947 (WINDOW_DISPLAY_PIXEL_HEIGHT ((W)) \
948 - WINDOW_DISPLAY_MODE_LINE_HEIGHT ((W)) \ 948 - WINDOW_DISPLAY_MODE_LINE_HEIGHT ((W)) \
949 - WINDOW_DISPLAY_TOP_LINE_HEIGHT ((W))) 949 - WINDOW_DISPLAY_HEADER_LINE_HEIGHT ((W)))
950 950
951/* Left edge of W in pixels relative to its frame. */ 951/* Left edge of W in pixels relative to its frame. */
952 952
@@ -1056,11 +1056,11 @@ extern struct glyph_row scratch_glyph_row;
1056 1056
1057/* Value is non-zero if window W wants a top line. */ 1057/* Value is non-zero if window W wants a top line. */
1058 1058
1059#define WINDOW_WANTS_TOP_LINE_P(W) \ 1059#define WINDOW_WANTS_HEADER_LINE_P(W) \
1060 (!MINI_WINDOW_P (W) \ 1060 (!MINI_WINDOW_P (W) \
1061 && !(W)->pseudo_window_p \ 1061 && !(W)->pseudo_window_p \
1062 && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (W))) \ 1062 && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (W))) \
1063 && !NILP (XBUFFER ((W)->buffer)->top_line_format)) 1063 && !NILP (XBUFFER ((W)->buffer)->header_line_format))
1064 1064
1065 1065
1066/*********************************************************************** 1066/***********************************************************************
@@ -1266,7 +1266,7 @@ enum face_id
1266 MODE_LINE_FACE_ID, 1266 MODE_LINE_FACE_ID,
1267 TOOL_BAR_FACE_ID, 1267 TOOL_BAR_FACE_ID,
1268 BITMAP_AREA_FACE_ID, 1268 BITMAP_AREA_FACE_ID,
1269 TOP_LINE_FACE_ID, 1269 HEADER_LINE_FACE_ID,
1270 BASIC_FACE_ID_SENTINEL 1270 BASIC_FACE_ID_SENTINEL
1271}; 1271};
1272 1272
@@ -1473,7 +1473,7 @@ struct it
1473 unsigned multibyte_p : 1; 1473 unsigned multibyte_p : 1;
1474 1474
1475 /* 1 means window has a mode line at its top. */ 1475 /* 1 means window has a mode line at its top. */
1476 unsigned top_line_p : 1; 1476 unsigned header_line_p : 1;
1477 1477
1478 /* 1 means `string' is the value of a `display' property. 1478 /* 1 means `string' is the value of a `display' property.
1479 Don't handle some `display' properties in these strings. */ 1479 Don't handle some `display' properties in these strings. */
diff --git a/src/dispnew.c b/src/dispnew.c
index b21f5796e01..ee3fbc3e335 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -508,18 +508,18 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
508 int i; 508 int i;
509 int new_rows; 509 int new_rows;
510 int marginal_areas_changed_p = 0; 510 int marginal_areas_changed_p = 0;
511 int top_line_changed_p = 0; 511 int header_line_changed_p = 0;
512 int top_line_p = 0; 512 int header_line_p = 0;
513 int left = -1, right = -1; 513 int left = -1, right = -1;
514 int window_x, window_y, window_width, window_height; 514 int window_x, window_y, window_width, window_height;
515 515
516 /* See if W had a top line that has disappeared now, or vice versa. */ 516 /* See if W had a top line that has disappeared now, or vice versa. */
517 if (w) 517 if (w)
518 { 518 {
519 top_line_p = WINDOW_WANTS_TOP_LINE_P (w); 519 header_line_p = WINDOW_WANTS_HEADER_LINE_P (w);
520 top_line_changed_p = top_line_p != matrix->top_line_p; 520 header_line_changed_p = header_line_p != matrix->header_line_p;
521 } 521 }
522 matrix->top_line_p = top_line_p; 522 matrix->header_line_p = header_line_p;
523 523
524 /* Do nothing if MATRIX' size, position, vscroll, and marginal areas 524 /* Do nothing if MATRIX' size, position, vscroll, and marginal areas
525 haven't changed. This optimization is important because preserving 525 haven't changed. This optimization is important because preserving
@@ -535,7 +535,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
535 535
536 if (!marginal_areas_changed_p 536 if (!marginal_areas_changed_p
537 && !fonts_changed_p 537 && !fonts_changed_p
538 && !top_line_changed_p 538 && !header_line_changed_p
539 && matrix->window_top_y == XFASTINT (w->top) 539 && matrix->window_top_y == XFASTINT (w->top)
540 && matrix->window_height == window_height 540 && matrix->window_height == window_height
541 && matrix->window_vscroll == w->vscroll 541 && matrix->window_vscroll == w->vscroll
@@ -584,7 +584,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
584 584
585 if (w == NULL 585 if (w == NULL
586 || row == matrix->rows + dim.height - 1 586 || row == matrix->rows + dim.height - 1
587 || (row == matrix->rows && matrix->top_line_p)) 587 || (row == matrix->rows && matrix->header_line_p))
588 { 588 {
589 row->glyphs[TEXT_AREA] 589 row->glyphs[TEXT_AREA]
590 = row->glyphs[LEFT_MARGIN_AREA]; 590 = row->glyphs[LEFT_MARGIN_AREA];
@@ -613,7 +613,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
613 its own memory. Allocate glyph memory from the heap. */ 613 its own memory. Allocate glyph memory from the heap. */
614 if (dim.width > matrix->matrix_w 614 if (dim.width > matrix->matrix_w
615 || new_rows 615 || new_rows
616 || top_line_changed_p 616 || header_line_changed_p
617 || marginal_areas_changed_p) 617 || marginal_areas_changed_p)
618 { 618 {
619 struct glyph_row *row = matrix->rows; 619 struct glyph_row *row = matrix->rows;
@@ -628,7 +628,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
628 628
629 /* The mode line never has marginal areas. */ 629 /* The mode line never has marginal areas. */
630 if (row == matrix->rows + dim.height - 1 630 if (row == matrix->rows + dim.height - 1
631 || (row == matrix->rows && matrix->top_line_p)) 631 || (row == matrix->rows && matrix->header_line_p))
632 { 632 {
633 row->glyphs[TEXT_AREA] 633 row->glyphs[TEXT_AREA]
634 = row->glyphs[LEFT_MARGIN_AREA]; 634 = row->glyphs[LEFT_MARGIN_AREA];
@@ -848,7 +848,7 @@ shift_glyph_matrix (w, matrix, start, end, dy)
848 xassert (start >= 0 && start < matrix->nrows); 848 xassert (start >= 0 && start < matrix->nrows);
849 xassert (end >= 0 && end <= matrix->nrows); 849 xassert (end >= 0 && end <= matrix->nrows);
850 850
851 min_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); 851 min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
852 max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w); 852 max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w);
853 853
854 for (; start < end; ++start) 854 for (; start < end; ++start)
@@ -998,7 +998,7 @@ blank_row (w, row, y)
998{ 998{
999 int min_y, max_y; 999 int min_y, max_y;
1000 1000
1001 min_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); 1001 min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
1002 max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w); 1002 max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w);
1003 1003
1004 clear_glyph_row (row); 1004 clear_glyph_row (row);
@@ -3602,7 +3602,7 @@ update_window (w, force_p)
3602 { 3602 {
3603 struct glyph_row *row, *end; 3603 struct glyph_row *row, *end;
3604 struct glyph_row *mode_line_row; 3604 struct glyph_row *mode_line_row;
3605 struct glyph_row *top_line_row = NULL; 3605 struct glyph_row *header_line_row = NULL;
3606 int yb, changed_p = 0; 3606 int yb, changed_p = 0;
3607 3607
3608 rif->update_window_begin_hook (w); 3608 rif->update_window_begin_hook (w);
@@ -3613,7 +3613,7 @@ update_window (w, force_p)
3613 row = desired_matrix->rows; 3613 row = desired_matrix->rows;
3614 end = row + desired_matrix->nrows - 1; 3614 end = row + desired_matrix->nrows - 1;
3615 if (row->mode_line_p) 3615 if (row->mode_line_p)
3616 top_line_row = row++; 3616 header_line_row = row++;
3617 3617
3618 /* Update the mode line, if necessary. */ 3618 /* Update the mode line, if necessary. */
3619 mode_line_row = MATRIX_MODE_LINE_ROW (desired_matrix); 3619 mode_line_row = MATRIX_MODE_LINE_ROW (desired_matrix);
@@ -3634,7 +3634,7 @@ update_window (w, force_p)
3634 /* Try reusing part of the display by inserting/deleting lines. */ 3634 /* Try reusing part of the display by inserting/deleting lines. */
3635 if (row < end && !desired_matrix->no_scrolling_p) 3635 if (row < end && !desired_matrix->no_scrolling_p)
3636 { 3636 {
3637 int rc = scrolling_window (w, top_line_row != NULL); 3637 int rc = scrolling_window (w, header_line_row != NULL);
3638 if (rc < 0) 3638 if (rc < 0)
3639 { 3639 {
3640 /* All rows were found to be equal. */ 3640 /* All rows were found to be equal. */
@@ -3649,9 +3649,9 @@ update_window (w, force_p)
3649 /* Update the top mode line after scrolling because a new top 3649 /* Update the top mode line after scrolling because a new top
3650 line would otherwise overwrite lines at the top of the window 3650 line would otherwise overwrite lines at the top of the window
3651 that can be scrolled. */ 3651 that can be scrolled. */
3652 if (top_line_row && top_line_row->enabled_p) 3652 if (header_line_row && header_line_row->enabled_p)
3653 { 3653 {
3654 top_line_row->y = 0; 3654 header_line_row->y = 0;
3655 update_window_line (w, 0); 3655 update_window_line (w, 0);
3656 changed_p = 1; 3656 changed_p = 1;
3657 } 3657 }
@@ -4085,7 +4085,7 @@ set_window_cursor_after_update (w)
4085 4085
4086 4086
4087/* Try to reuse part of the current display of W by scrolling lines. 4087/* Try to reuse part of the current display of W by scrolling lines.
4088 TOP_LINE_P non-zero means W has a top mode line. 4088 HEADER_LINE_P non-zero means W has a top mode line.
4089 4089
4090 The algorithm is taken from Communications of the ACM, Apr78 "A 4090 The algorithm is taken from Communications of the ACM, Apr78 "A
4091 Technique for Isolating Differences Between Files." It should take 4091 Technique for Isolating Differences Between Files." It should take
@@ -4111,9 +4111,9 @@ set_window_cursor_after_update (w)
4111 1 if we did scroll. */ 4111 1 if we did scroll. */
4112 4112
4113static int 4113static int
4114scrolling_window (w, top_line_p) 4114scrolling_window (w, header_line_p)
4115 struct window *w; 4115 struct window *w;
4116 int top_line_p; 4116 int header_line_p;
4117{ 4117{
4118 struct symbol 4118 struct symbol
4119 { 4119 {
@@ -4142,7 +4142,7 @@ scrolling_window (w, top_line_p)
4142 int yb = window_text_bottom_y (w); 4142 int yb = window_text_bottom_y (w);
4143 4143
4144 /* Skip over rows equal at the start. */ 4144 /* Skip over rows equal at the start. */
4145 i = top_line_p ? 1 : 0; 4145 i = header_line_p ? 1 : 0;
4146 while (i < current_matrix->nrows - 1 4146 while (i < current_matrix->nrows - 1
4147 && MATRIX_ROW_ENABLED_P (current_matrix, i) 4147 && MATRIX_ROW_ENABLED_P (current_matrix, i)
4148 && MATRIX_ROW_ENABLED_P (desired_matrix, i) 4148 && MATRIX_ROW_ENABLED_P (desired_matrix, i)
@@ -5121,7 +5121,7 @@ mode_line_string (w, x, y, mode_line_p, charpos)
5121 if (mode_line_p) 5121 if (mode_line_p)
5122 row = MATRIX_MODE_LINE_ROW (w->current_matrix); 5122 row = MATRIX_MODE_LINE_ROW (w->current_matrix);
5123 else 5123 else
5124 row = MATRIX_TOP_LINE_ROW (w->current_matrix); 5124 row = MATRIX_HEADER_LINE_ROW (w->current_matrix);
5125 5125
5126 if (row->mode_line_p && row->enabled_p) 5126 if (row->mode_line_p && row->enabled_p)
5127 { 5127 {
diff --git a/src/keyboard.c b/src/keyboard.c
index 2dc7af7a8aa..8d5144836a8 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -4281,7 +4281,7 @@ make_lispy_event (event)
4281 Lisp_Object string; 4281 Lisp_Object string;
4282 int charpos; 4282 int charpos;
4283 4283
4284 posn = part == 1 ? Qmode_line : Qtop_line; 4284 posn = part == 1 ? Qmode_line : Qheader_line;
4285 string = mode_line_string (w, wx, wy, part == 1, &charpos); 4285 string = mode_line_string (w, wx, wy, part == 1, &charpos);
4286 if (STRINGP (string)) 4286 if (STRINGP (string))
4287 string_info = Fcons (string, make_number (charpos)); 4287 string_info = Fcons (string, make_number (charpos));
@@ -4564,7 +4564,7 @@ make_lispy_event (event)
4564 else if (part == 2) 4564 else if (part == 2)
4565 posn = Qvertical_line; 4565 posn = Qvertical_line;
4566 else if (part == 3) 4566 else if (part == 3)
4567 posn = Qtop_line; 4567 posn = Qheader_line;
4568 else 4568 else
4569 XSETINT (posn, 4569 XSETINT (posn,
4570 buffer_posn_from_coords (XWINDOW (window), 4570 buffer_posn_from_coords (XWINDOW (window),
@@ -4645,7 +4645,7 @@ make_lispy_event (event)
4645 else if (part == 2) 4645 else if (part == 2)
4646 posn = Qvertical_line; 4646 posn = Qvertical_line;
4647 else if (part == 3) 4647 else if (part == 3)
4648 posn = Qtop_line; 4648 posn = Qheader_line;
4649 else 4649 else
4650 XSETINT (posn, buffer_posn_from_coords (w, &wx, &wy)); 4650 XSETINT (posn, buffer_posn_from_coords (w, &wx, &wy));
4651 } 4651 }
@@ -4758,7 +4758,7 @@ make_lispy_movement (frame, bar_window, part, x, y, time)
4758 else if (area == 2) 4758 else if (area == 2)
4759 posn = Qvertical_line; 4759 posn = Qvertical_line;
4760 else if (area == 3) 4760 else if (area == 3)
4761 posn = Qtop_line; 4761 posn = Qheader_line;
4762 else 4762 else
4763 XSETINT (posn, buffer_posn_from_coords (w, &wx, &wy)); 4763 XSETINT (posn, buffer_posn_from_coords (w, &wx, &wy));
4764 } 4764 }
diff --git a/src/keyboard.h b/src/keyboard.h
index 64591fb8565..68eedb89c4a 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -289,7 +289,7 @@ extern Lisp_Object Qscroll_bar_movement;
289 (Fget ((event_head), Qevent_kind)) 289 (Fget ((event_head), Qevent_kind))
290 290
291/* Symbols to use for non-text mouse positions. */ 291/* Symbols to use for non-text mouse positions. */
292extern Lisp_Object Qmode_line, Qvertical_line, Qtop_line; 292extern Lisp_Object Qmode_line, Qvertical_line, Qheader_line;
293 293
294/* Forward declaration for prototypes. */ 294/* Forward declaration for prototypes. */
295struct input_event; 295struct input_event;
diff --git a/src/window.c b/src/window.c
index 6bef8fe928b..5f1af561632 100644
--- a/src/window.c
+++ b/src/window.c
@@ -480,8 +480,8 @@ coordinates_in_window (w, x, y)
480 && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w)) 480 && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w))
481 /* On the mode line. */ 481 /* On the mode line. */
482 return 2; 482 return 2;
483 else if (WINDOW_WANTS_TOP_LINE_P (w) 483 else if (WINDOW_WANTS_HEADER_LINE_P (w)
484 && *y < top_y + CURRENT_TOP_LINE_HEIGHT (w)) 484 && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w))
485 /* On the top line. */ 485 /* On the top line. */
486 return 4; 486 return 4;
487 else if (*x < left_x || *x >= right_x) 487 else if (*x < left_x || *x >= right_x)
@@ -519,7 +519,7 @@ frame.\n\
519If COORDINATES are in the text portion of WINDOW,\n\ 519If COORDINATES are in the text portion of WINDOW,\n\
520 the coordinates relative to the window are returned.\n\ 520 the coordinates relative to the window are returned.\n\
521If they are in the mode line of WINDOW, `mode-line' is returned.\n\ 521If they are in the mode line of WINDOW, `mode-line' is returned.\n\
522If they are in the top mode line of WINDOW, `top-line' is returned.\n\ 522If they are in the top mode line of WINDOW, `header-line' is returned.\n\
523If they are in the bitmap-area to the left of the window,\n\ 523If they are in the bitmap-area to the left of the window,\n\
524 `left-bitmap-area' is returned, if they are in the area on the right of\n\ 524 `left-bitmap-area' is returned, if they are in the area on the right of\n\
525 the window, `right-bitmap-area' is returned.\n\ 525 the window, `right-bitmap-area' is returned.\n\
@@ -563,7 +563,7 @@ If they are on the border between WINDOW and its right sibling,\n\
563 return Qvertical_line; 563 return Qvertical_line;
564 564
565 case 4: 565 case 4:
566 return Qtop_line; 566 return Qheader_line;
567 567
568 case 5: 568 case 5:
569 return Qleft_bitmap_area; 569 return Qleft_bitmap_area;
@@ -2089,7 +2089,7 @@ window_min_size_1 (w, width_p)
2089 { 2089 {
2090 if (MINI_WINDOW_P (w) 2090 if (MINI_WINDOW_P (w)
2091 || (!WINDOW_WANTS_MODELINE_P (w) 2091 || (!WINDOW_WANTS_MODELINE_P (w)
2092 && !WINDOW_WANTS_TOP_LINE_P (w))) 2092 && !WINDOW_WANTS_HEADER_LINE_P (w)))
2093 size = 1; 2093 size = 1;
2094 else 2094 else
2095 size = window_min_height; 2095 size = window_min_height;
diff --git a/src/xdisp.c b/src/xdisp.c
index 1c83bd79987..a816c064b49 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -758,8 +758,8 @@ window_box_height (w)
758 if (WINDOW_WANTS_MODELINE_P (w)) 758 if (WINDOW_WANTS_MODELINE_P (w))
759 height -= CURRENT_MODE_LINE_HEIGHT (w); 759 height -= CURRENT_MODE_LINE_HEIGHT (w);
760 760
761 if (WINDOW_WANTS_TOP_LINE_P (w)) 761 if (WINDOW_WANTS_HEADER_LINE_P (w))
762 height -= CURRENT_TOP_LINE_HEIGHT (w); 762 height -= CURRENT_HEADER_LINE_HEIGHT (w);
763 763
764 return height; 764 return height;
765} 765}
@@ -828,8 +828,8 @@ window_box (w, area, box_x, box_y, box_width, box_height)
828 *box_x = window_box_left (w, area); 828 *box_x = window_box_left (w, area);
829 *box_y = (FRAME_INTERNAL_BORDER_WIDTH_SAFE (f) 829 *box_y = (FRAME_INTERNAL_BORDER_WIDTH_SAFE (f)
830 + XFASTINT (w->top) * CANON_Y_UNIT (f)); 830 + XFASTINT (w->top) * CANON_Y_UNIT (f));
831 if (WINDOW_WANTS_TOP_LINE_P (w)) 831 if (WINDOW_WANTS_HEADER_LINE_P (w))
832 *box_y += CURRENT_TOP_LINE_HEIGHT (w); 832 *box_y += CURRENT_HEADER_LINE_HEIGHT (w);
833} 833}
834 834
835 835
@@ -1159,11 +1159,11 @@ check_window_end (w)
1159 1159
1160 BASE_FACE_ID is the id of a base face to use. It must be one of 1160 BASE_FACE_ID is the id of a base face to use. It must be one of
1161 DEFAULT_FACE_ID for normal text, MODE_LINE_FACE_ID or 1161 DEFAULT_FACE_ID for normal text, MODE_LINE_FACE_ID or
1162 TOP_LINE_FACE_ID for displaying mode lines, or TOOL_BAR_FACE_ID for 1162 HEADER_LINE_FACE_ID for displaying mode lines, or TOOL_BAR_FACE_ID for
1163 displaying the tool-bar. 1163 displaying the tool-bar.
1164 1164
1165 If ROW is null and BASE_FACE_ID is equal to MODE_LINE_FACE_ID or 1165 If ROW is null and BASE_FACE_ID is equal to MODE_LINE_FACE_ID or
1166 TOP_LINE_FACE_ID, the iterator will be initialized to use the 1166 HEADER_LINE_FACE_ID, the iterator will be initialized to use the
1167 corresponding mode line glyph row of the desired matrix of W. */ 1167 corresponding mode line glyph row of the desired matrix of W. */
1168 1168
1169void 1169void
@@ -1195,8 +1195,8 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id)
1195 { 1195 {
1196 if (base_face_id == MODE_LINE_FACE_ID) 1196 if (base_face_id == MODE_LINE_FACE_ID)
1197 row = MATRIX_MODE_LINE_ROW (w->desired_matrix); 1197 row = MATRIX_MODE_LINE_ROW (w->desired_matrix);
1198 else if (base_face_id == TOP_LINE_FACE_ID) 1198 else if (base_face_id == HEADER_LINE_FACE_ID)
1199 row = MATRIX_TOP_LINE_ROW (w->desired_matrix); 1199 row = MATRIX_HEADER_LINE_ROW (w->desired_matrix);
1200 } 1200 }
1201 1201
1202 /* Clear IT. */ 1202 /* Clear IT. */
@@ -1349,8 +1349,8 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id)
1349 it->last_visible_x -= it->continuation_pixel_width; 1349 it->last_visible_x -= it->continuation_pixel_width;
1350 } 1350 }
1351 1351
1352 it->top_line_p = WINDOW_WANTS_TOP_LINE_P (w); 1352 it->header_line_p = WINDOW_WANTS_HEADER_LINE_P (w);
1353 it->current_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w) + w->vscroll; 1353 it->current_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w) + w->vscroll;
1354 } 1354 }
1355 1355
1356 /* Leave room for a border glyph. */ 1356 /* Leave room for a border glyph. */
@@ -1407,7 +1407,7 @@ start_display (it, w, pos)
1407{ 1407{
1408 int start_at_line_beg_p; 1408 int start_at_line_beg_p;
1409 struct glyph_row *row; 1409 struct glyph_row *row;
1410 int first_vpos = WINDOW_WANTS_TOP_LINE_P (w) ? 1 : 0; 1410 int first_vpos = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
1411 int first_y; 1411 int first_y;
1412 1412
1413 row = w->desired_matrix->rows + first_vpos; 1413 row = w->desired_matrix->rows + first_vpos;
@@ -7841,7 +7841,7 @@ make_cursor_line_fully_visible (w)
7841{ 7841{
7842 struct glyph_matrix *matrix; 7842 struct glyph_matrix *matrix;
7843 struct glyph_row *row; 7843 struct glyph_row *row;
7844 int top_line_height; 7844 int header_line_height;
7845 7845
7846 /* It's not always possible to find the cursor, e.g, when a window 7846 /* It's not always possible to find the cursor, e.g, when a window
7847 is full of overlay strings. Don't do anything in that case. */ 7847 is full of overlay strings. Don't do anything in that case. */
@@ -7854,8 +7854,8 @@ make_cursor_line_fully_visible (w)
7854 /* If row->y == top y of window display area, the window isn't tall 7854 /* If row->y == top y of window display area, the window isn't tall
7855 enough to display a single line. There is nothing we can do 7855 enough to display a single line. There is nothing we can do
7856 about it. */ 7856 about it. */
7857 top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); 7857 header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
7858 if (row->y == top_line_height) 7858 if (row->y == header_line_height)
7859 return; 7859 return;
7860 7860
7861 if (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row)) 7861 if (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row))
@@ -8000,7 +8000,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
8000 { 8000 {
8001 aggressive = current_buffer->scroll_down_aggressively; 8001 aggressive = current_buffer->scroll_down_aggressively;
8002 height = (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w) 8002 height = (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w)
8003 - WINDOW_DISPLAY_TOP_LINE_HEIGHT (w)); 8003 - WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w));
8004 if (NUMBERP (aggressive)) 8004 if (NUMBERP (aggressive))
8005 amount_to_scroll = XFLOATINT (aggressive) * height; 8005 amount_to_scroll = XFLOATINT (aggressive) * height;
8006 } 8006 }
@@ -8053,7 +8053,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
8053 { 8053 {
8054 aggressive = current_buffer->scroll_up_aggressively; 8054 aggressive = current_buffer->scroll_up_aggressively;
8055 height = (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w) 8055 height = (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w)
8056 - WINDOW_DISPLAY_TOP_LINE_HEIGHT (w)); 8056 - WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w));
8057 if (NUMBERP (aggressive)) 8057 if (NUMBERP (aggressive))
8058 amount_to_scroll = XFLOATINT (aggressive) * height; 8058 amount_to_scroll = XFLOATINT (aggressive) * height;
8059 } 8059 }
@@ -8124,7 +8124,7 @@ compute_window_start_on_continuation_line (w)
8124 8124
8125 /* Find the start of the continued line. This should be fast 8125 /* Find the start of the continued line. This should be fast
8126 because scan_buffer is fast (newline cache). */ 8126 because scan_buffer is fast (newline cache). */
8127 row = w->desired_matrix->rows + (WINDOW_WANTS_TOP_LINE_P (w) ? 1 : 0); 8127 row = w->desired_matrix->rows + (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0);
8128 init_iterator (&it, w, CHARPOS (start_pos), BYTEPOS (start_pos), 8128 init_iterator (&it, w, CHARPOS (start_pos), BYTEPOS (start_pos),
8129 row, DEFAULT_FACE_ID); 8129 row, DEFAULT_FACE_ID);
8130 reseat_at_previous_visible_line_start (&it); 8130 reseat_at_previous_visible_line_start (&it);
@@ -8868,7 +8868,7 @@ redisplay_window (window, just_this_one_p)
8868 && XFASTINT (w->column_number_displayed) != current_column ())) 8868 && XFASTINT (w->column_number_displayed) != current_column ()))
8869 /* This means that the window has a mode line. */ 8869 /* This means that the window has a mode line. */
8870 && (WINDOW_WANTS_MODELINE_P (w) 8870 && (WINDOW_WANTS_MODELINE_P (w)
8871 || WINDOW_WANTS_TOP_LINE_P (w))) 8871 || WINDOW_WANTS_HEADER_LINE_P (w)))
8872 { 8872 {
8873 display_mode_lines (w); 8873 display_mode_lines (w);
8874 8874
@@ -8884,12 +8884,12 @@ redisplay_window (window, just_this_one_p)
8884 8884
8885 /* If top line height has changed, arrange for a thorough 8885 /* If top line height has changed, arrange for a thorough
8886 immediate redisplay using the correct mode line height. */ 8886 immediate redisplay using the correct mode line height. */
8887 if (WINDOW_WANTS_TOP_LINE_P (w) 8887 if (WINDOW_WANTS_HEADER_LINE_P (w)
8888 && CURRENT_TOP_LINE_HEIGHT (w) != DESIRED_TOP_LINE_HEIGHT (w)) 8888 && CURRENT_HEADER_LINE_HEIGHT (w) != DESIRED_HEADER_LINE_HEIGHT (w))
8889 { 8889 {
8890 fonts_changed_p = 1; 8890 fonts_changed_p = 1;
8891 MATRIX_TOP_LINE_ROW (w->current_matrix)->height 8891 MATRIX_HEADER_LINE_ROW (w->current_matrix)->height
8892 = DESIRED_TOP_LINE_HEIGHT (w); 8892 = DESIRED_HEADER_LINE_HEIGHT (w);
8893 } 8893 }
8894 8894
8895 if (fonts_changed_p) 8895 if (fonts_changed_p)
@@ -9089,8 +9089,8 @@ try_window_reusing_current_matrix (w)
9089 return 0; 9089 return 0;
9090 9090
9091 /* If top-line visibility has changed, give up. */ 9091 /* If top-line visibility has changed, give up. */
9092 if (WINDOW_WANTS_TOP_LINE_P (w) 9092 if (WINDOW_WANTS_HEADER_LINE_P (w)
9093 != MATRIX_TOP_LINE_ROW (w->current_matrix)->mode_line_p) 9093 != MATRIX_HEADER_LINE_ROW (w->current_matrix)->mode_line_p)
9094 return 0; 9094 return 0;
9095 9095
9096 /* Give up if old or new display is scrolled vertically. We could 9096 /* Give up if old or new display is scrolled vertically. We could
@@ -9197,7 +9197,7 @@ try_window_reusing_current_matrix (w)
9197 9197
9198 /* Re-compute Y positions. */ 9198 /* Re-compute Y positions. */
9199 row = MATRIX_FIRST_TEXT_ROW (w->current_matrix) + nrows_scrolled; 9199 row = MATRIX_FIRST_TEXT_ROW (w->current_matrix) + nrows_scrolled;
9200 min_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); 9200 min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
9201 max_y = it.last_visible_y; 9201 max_y = it.last_visible_y;
9202 while (row < bottom_row) 9202 while (row < bottom_row)
9203 { 9203 {
@@ -9340,7 +9340,7 @@ try_window_reusing_current_matrix (w)
9340 9340
9341 /* Scroll the display. */ 9341 /* Scroll the display. */
9342 run.current_y = first_reusable_row->y; 9342 run.current_y = first_reusable_row->y;
9343 run.desired_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); 9343 run.desired_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
9344 run.height = it.last_visible_y - run.current_y; 9344 run.height = it.last_visible_y - run.current_y;
9345 if (run.height) 9345 if (run.height)
9346 { 9346 {
@@ -9356,7 +9356,7 @@ try_window_reusing_current_matrix (w)
9356 bottom_row = MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w); 9356 bottom_row = MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w);
9357 row = first_reusable_row; 9357 row = first_reusable_row;
9358 dy = first_reusable_row->y; 9358 dy = first_reusable_row->y;
9359 min_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); 9359 min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
9360 max_y = it.last_visible_y; 9360 max_y = it.last_visible_y;
9361 while (row < first_row_to_display) 9361 while (row < first_row_to_display)
9362 { 9362 {
@@ -10180,13 +10180,13 @@ try_window_id (w)
10180 /* Displayed to end of window, but no line containing text was 10180 /* Displayed to end of window, but no line containing text was
10181 displayed. Lines were deleted at the end of the window. */ 10181 displayed. Lines were deleted at the end of the window. */
10182 int vpos; 10182 int vpos;
10183 int top_line_p = WINDOW_WANTS_TOP_LINE_P (w) ? 1 : 0; 10183 int header_line_p = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
10184 10184
10185 for (vpos = XFASTINT (w->window_end_vpos); vpos > 0; --vpos) 10185 for (vpos = XFASTINT (w->window_end_vpos); vpos > 0; --vpos)
10186 if ((w->desired_matrix->rows[vpos + top_line_p].enabled_p 10186 if ((w->desired_matrix->rows[vpos + header_line_p].enabled_p
10187 && w->desired_matrix->rows[vpos + top_line_p].displays_text_p) 10187 && w->desired_matrix->rows[vpos + header_line_p].displays_text_p)
10188 || (!w->desired_matrix->rows[vpos + top_line_p].enabled_p 10188 || (!w->desired_matrix->rows[vpos + header_line_p].enabled_p
10189 && w->current_matrix->rows[vpos + top_line_p].displays_text_p)) 10189 && w->current_matrix->rows[vpos + header_line_p].displays_text_p))
10190 break; 10190 break;
10191 10191
10192 w->window_end_vpos = make_number (vpos); 10192 w->window_end_vpos = make_number (vpos);
@@ -10538,7 +10538,7 @@ compute_line_metrics (it)
10538 10538
10539 if (FRAME_WINDOW_P (it->f)) 10539 if (FRAME_WINDOW_P (it->f))
10540 { 10540 {
10541 int i, top_line_height; 10541 int i, header_line_height;
10542 10542
10543 /* The line may consist of one space only, that was added to 10543 /* The line may consist of one space only, that was added to
10544 place the cursor on it. If so, the row's height hasn't been 10544 place the cursor on it. If so, the row's height hasn't been
@@ -10577,9 +10577,9 @@ compute_line_metrics (it)
10577 /* Compute how much of the line is visible. */ 10577 /* Compute how much of the line is visible. */
10578 row->visible_height = row->height; 10578 row->visible_height = row->height;
10579 10579
10580 top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (it->w); 10580 header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (it->w);
10581 if (row->y < top_line_height) 10581 if (row->y < header_line_height)
10582 row->visible_height -= top_line_height - row->y; 10582 row->visible_height -= header_line_height - row->y;
10583 else 10583 else
10584 { 10584 {
10585 int max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (it->w); 10585 int max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (it->w);
@@ -11296,15 +11296,17 @@ display_mode_lines (w)
11296 w->column_number_displayed = Qnil; 11296 w->column_number_displayed = Qnil;
11297 11297
11298 if (WINDOW_WANTS_MODELINE_P (w)) 11298 if (WINDOW_WANTS_MODELINE_P (w))
11299 display_mode_line (w, MODE_LINE_FACE_ID, current_buffer->mode_line_format); 11299 display_mode_line (w, MODE_LINE_FACE_ID,
11300 current_buffer->mode_line_format);
11300 11301
11301 if (WINDOW_WANTS_TOP_LINE_P (w)) 11302 if (WINDOW_WANTS_HEADER_LINE_P (w))
11302 display_mode_line (w, TOP_LINE_FACE_ID, current_buffer->top_line_format); 11303 display_mode_line (w, HEADER_LINE_FACE_ID,
11304 current_buffer->header_line_format);
11303} 11305}
11304 11306
11305 11307
11306/* Display mode or top line of window W. FACE_ID specifies which line 11308/* Display mode or top line of window W. FACE_ID specifies which line
11307 to display; it is either MODE_LINE_FACE_ID or TOP_LINE_FACE_ID. 11309 to display; it is either MODE_LINE_FACE_ID or HEADER_LINE_FACE_ID.
11308 FORMAT is the mode line format to display. */ 11310 FORMAT is the mode line format to display. */
11309 11311
11310static void 11312static void
diff --git a/src/xfaces.c b/src/xfaces.c
index 9efdfb4574e..34d02ee84a0 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -281,7 +281,7 @@ Lisp_Object Qx_charset_registry;
281/* Names of basic faces. */ 281/* Names of basic faces. */
282 282
283Lisp_Object Qdefault, Qmodeline, Qtool_bar, Qregion, Qmargin; 283Lisp_Object Qdefault, Qmodeline, Qtool_bar, Qregion, Qmargin;
284Lisp_Object Qtop_line; 284Lisp_Object Qheader_line;
285 285
286/* Default stipple pattern used on monochrome displays. This stipple 286/* Default stipple pattern used on monochrome displays. This stipple
287 pattern is used on monochrome displays instead of shades of gray 287 pattern is used on monochrome displays instead of shades of gray
@@ -5132,7 +5132,7 @@ realize_basic_faces (f)
5132 realize_named_face (f, Qmodeline, MODE_LINE_FACE_ID); 5132 realize_named_face (f, Qmodeline, MODE_LINE_FACE_ID);
5133 realize_named_face (f, Qtool_bar, TOOL_BAR_FACE_ID); 5133 realize_named_face (f, Qtool_bar, TOOL_BAR_FACE_ID);
5134 realize_named_face (f, Qmargin, BITMAP_AREA_FACE_ID); 5134 realize_named_face (f, Qmargin, BITMAP_AREA_FACE_ID);
5135 realize_named_face (f, Qtop_line, TOP_LINE_FACE_ID); 5135 realize_named_face (f, Qheader_line, HEADER_LINE_FACE_ID);
5136 success_p = 1; 5136 success_p = 1;
5137 } 5137 }
5138 5138
@@ -5954,7 +5954,7 @@ face_at_buffer_position (w, pos, region_beg, region_end,
5954 REGION_BEG and REGION_END give the start and end positions of the 5954 REGION_BEG and REGION_END give the start and end positions of the
5955 region; both are -1 if no region is visible. BASE_FACE_ID is the 5955 region; both are -1 if no region is visible. BASE_FACE_ID is the
5956 id of the basic face to merge with. It is usually equal to 5956 id of the basic face to merge with. It is usually equal to
5957 DEFAULT_FACE_ID but can be MODE_LINE_FACE_ID or TOP_LINE_FACE_ID 5957 DEFAULT_FACE_ID but can be MODE_LINE_FACE_ID or HEADER_LINE_FACE_ID
5958 for strings displayed in the mode or top line. 5958 for strings displayed in the mode or top line.
5959 5959
5960 Set *ENDPTR to the next position where to check for faces in 5960 Set *ENDPTR to the next position where to check for faces in
@@ -6248,8 +6248,8 @@ syms_of_xfaces ()
6248 staticpro (&Qregion); 6248 staticpro (&Qregion);
6249 Qmargin = intern ("margin"); 6249 Qmargin = intern ("margin");
6250 staticpro (&Qmargin); 6250 staticpro (&Qmargin);
6251 Qtop_line = intern ("top-line"); 6251 Qheader_line = intern ("header-line");
6252 staticpro (&Qtop_line); 6252 staticpro (&Qheader_line);
6253 6253
6254 defsubr (&Sinternal_make_lisp_face); 6254 defsubr (&Sinternal_make_lisp_face);
6255 defsubr (&Sinternal_lisp_face_p); 6255 defsubr (&Sinternal_lisp_face_p);
diff --git a/src/xterm.c b/src/xterm.c
index bdc7bfe627e..727bbdcdcf7 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -868,7 +868,7 @@ x_draw_row_bitmaps (w, row)
868 struct frame *f = XFRAME (w->frame); 868 struct frame *f = XFRAME (w->frame);
869 enum bitmap_type bitmap; 869 enum bitmap_type bitmap;
870 struct face *face; 870 struct face *face;
871 int top_line_height = -1; 871 int header_line_height = -1;
872 872
873 xassert (interrupt_input_blocked); 873 xassert (interrupt_input_blocked);
874 874
@@ -904,8 +904,8 @@ x_draw_row_bitmaps (w, row)
904 ? 1 : 0); 904 ? 1 : 0);
905 int left = window_box_left (w, -1); 905 int left = window_box_left (w, -1);
906 906
907 if (top_line_height < 0) 907 if (header_line_height < 0)
908 top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); 908 header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
909 909
910 /* In case the same realized face is used for bitmap areas and 910 /* In case the same realized face is used for bitmap areas and
911 for something displayed in the text (e.g. face `region' on 911 for something displayed in the text (e.g. face `region' on
@@ -921,7 +921,7 @@ x_draw_row_bitmaps (w, row)
921 (left 921 (left
922 - FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) 922 - FRAME_X_LEFT_FLAGS_AREA_WIDTH (f)
923 + border), 923 + border),
924 WINDOW_TO_FRAME_PIXEL_Y (w, max (top_line_height, 924 WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
925 row->y)), 925 row->y)),
926 FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - border, 926 FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - border,
927 row->visible_height); 927 row->visible_height);
@@ -949,8 +949,8 @@ x_draw_row_bitmaps (w, row)
949 { 949 {
950 int right = window_box_right (w, -1); 950 int right = window_box_right (w, -1);
951 951
952 if (top_line_height < 0) 952 if (header_line_height < 0)
953 top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); 953 header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
954 954
955 /* In case the same realized face is used for bitmap areas and 955 /* In case the same realized face is used for bitmap areas and
956 for something displayed in the text (e.g. face `region' on 956 for something displayed in the text (e.g. face `region' on
@@ -963,7 +963,7 @@ x_draw_row_bitmaps (w, row)
963 XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 963 XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
964 face->gc, 964 face->gc,
965 right, 965 right,
966 WINDOW_TO_FRAME_PIXEL_Y (w, max (top_line_height, 966 WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
967 row->y)), 967 row->y)),
968 FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f), 968 FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f),
969 row->visible_height); 969 row->visible_height);
@@ -2435,7 +2435,7 @@ x_get_glyph_string_clip_rect (s, r)
2435 partially visible lines at the top of a window. */ 2435 partially visible lines at the top of a window. */
2436 if (!s->row->full_width_p 2436 if (!s->row->full_width_p
2437 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row)) 2437 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row))
2438 r->y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (s->w); 2438 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w);
2439 else 2439 else
2440 r->y = max (0, s->row->y); 2440 r->y = max (0, s->row->y);
2441 2441
@@ -2449,7 +2449,7 @@ x_get_glyph_string_clip_rect (s, r)
2449 intentionally draws over other lines. */ 2449 intentionally draws over other lines. */
2450 if (s->for_overlaps_p) 2450 if (s->for_overlaps_p)
2451 { 2451 {
2452 r->y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (s->w); 2452 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w);
2453 r->height = window_text_bottom_y (s->w) - r->y; 2453 r->height = window_text_bottom_y (s->w) - r->y;
2454 } 2454 }
2455 2455
@@ -4722,7 +4722,7 @@ x_clear_end_of_line (to_x)
4722 to_x = WINDOW_AREA_TO_FRAME_PIXEL_X (w, updated_area, to_x); 4722 to_x = WINDOW_AREA_TO_FRAME_PIXEL_X (w, updated_area, to_x);
4723 } 4723 }
4724 4724
4725 min_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); 4725 min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
4726 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, output_cursor.y)); 4726 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, output_cursor.y));
4727 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, to_y); 4727 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, to_y);
4728 4728
@@ -6047,7 +6047,7 @@ note_mode_line_highlight (w, x, mode_line_p)
6047 if (mode_line_p) 6047 if (mode_line_p)
6048 row = MATRIX_MODE_LINE_ROW (w->current_matrix); 6048 row = MATRIX_MODE_LINE_ROW (w->current_matrix);
6049 else 6049 else
6050 row = MATRIX_TOP_LINE_ROW (w->current_matrix); 6050 row = MATRIX_HEADER_LINE_ROW (w->current_matrix);
6051 6051
6052 if (row->enabled_p) 6052 if (row->enabled_p)
6053 { 6053 {
@@ -10000,7 +10000,7 @@ x_erase_phys_cursor (w)
10000 if (w->phys_cursor_type == HOLLOW_BOX_CURSOR) 10000 if (w->phys_cursor_type == HOLLOW_BOX_CURSOR)
10001 { 10001 {
10002 int x; 10002 int x;
10003 int top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); 10003 int header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
10004 10004
10005 cursor_glyph = get_phys_cursor_glyph (w); 10005 cursor_glyph = get_phys_cursor_glyph (w);
10006 if (cursor_glyph == NULL) 10006 if (cursor_glyph == NULL)
@@ -10010,7 +10010,7 @@ x_erase_phys_cursor (w)
10010 10010
10011 XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 10011 XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
10012 x, 10012 x,
10013 WINDOW_TO_FRAME_PIXEL_Y (w, max (top_line_height, 10013 WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
10014 cursor_row->y)), 10014 cursor_row->y)),
10015 cursor_glyph->pixel_width, 10015 cursor_glyph->pixel_width,
10016 cursor_row->visible_height, 10016 cursor_row->visible_height,