Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
045dee35
Commit
045dee35
authored
Sep 05, 1999
by
Gerd Moellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change
`top-line' and `top_line' to `header-line' and `header_line'. Likewise for similar spellings.
parent
e5e7779f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
119 additions
and
116 deletions
+119
-116
src/buffer.c
src/buffer.c
+8
-7
src/buffer.h
src/buffer.h
+1
-1
src/dispextern.h
src/dispextern.h
+19
-19
src/dispnew.c
src/dispnew.c
+21
-21
src/keyboard.c
src/keyboard.c
+4
-4
src/keyboard.h
src/keyboard.h
+1
-1
src/window.c
src/window.c
+5
-5
src/xdisp.c
src/xdisp.c
+42
-40
src/xfaces.c
src/xfaces.c
+5
-5
src/xterm.c
src/xterm.c
+13
-13
No files found.
src/buffer.c
View file @
045dee35
...
...
@@ -3850,7 +3850,7 @@ init_buffer_once ()
/* real setup is done in loaddefs.el */
buffer_defaults
.
mode_line_format
=
build_string
(
"%-"
);
buffer_defaults
.
top
_line_format
=
Qnil
;
buffer_defaults
.
header
_line_format
=
Qnil
;
buffer_defaults
.
abbrev_mode
=
Qnil
;
buffer_defaults
.
overwrite_mode
=
Qnil
;
buffer_defaults
.
case_fold_search
=
Qt
;
...
...
@@ -3949,7 +3949,7 @@ init_buffer_once ()
XSETFASTINT
(
buffer_local_flags
.
indicate_empty_lines
,
0x400000
);
XSETFASTINT
(
buffer_local_flags
.
scroll_up_aggressively
,
0x800000
);
XSETFASTINT
(
buffer_local_flags
.
scroll_down_aggressively
,
0x1000000
);
XSETFASTINT
(
buffer_local_flags
.
top
_line_format
,
0x2000000
);
XSETFASTINT
(
buffer_local_flags
.
header
_line_format
,
0x2000000
);
Vbuffer_alist
=
Qnil
;
current_buffer
=
0
;
...
...
@@ -4097,10 +4097,10 @@ syms_of_buffer ()
"Default value of `mode-line-format' for buffers that don't override it.
\n
\
This is the same as (default-value 'mode-line-format)."
);
DEFVAR_LISP_NOPRO
(
"default-
top
-line-format"
,
&
buffer_defaults
.
top
_line_format
,
"Default value of `
top
-line-format' for buffers that don't override it.
\n
\
This is the same as (default-value '
top
-line-format)."
);
DEFVAR_LISP_NOPRO
(
"default-
header
-line-format"
,
&
buffer_defaults
.
header
_line_format
,
"Default value of `
header
-line-format' for buffers that don't override it.
\n
\
This is the same as (default-value '
header
-line-format)."
);
DEFVAR_LISP_NOPRO
(
"default-abbrev-mode"
,
&
buffer_defaults
.
abbrev_mode
,
...
...
@@ -4187,7 +4187,8 @@ don't override it. This is the same as (default-value\n\
don't override it. This is the same as (default-value
\n
\
'scroll-down-aggressively)."
);
DEFVAR_PER_BUFFER
(
"top-line-format"
,
&
current_buffer
->
top_line_format
,
DEFVAR_PER_BUFFER
(
"header-line-format"
,
&
current_buffer
->
header_line_format
,
Qnil
,
"Analogous to `mode-line-format', but for a mode line displayed
\n
\
at the top of windows."
);
...
...
src/buffer.h
View file @
045dee35
...
...
@@ -587,7 +587,7 @@ struct buffer
/* Analogous to mode_line_format for the line displayed at the top
of windows. Nil means don't display that line. */
Lisp_Object
top
_line_format
;
Lisp_Object
header
_line_format
;
/* Keys that are bound local to this buffer. */
Lisp_Object
keymap
;
...
...
src/dispextern.h
View file @
045dee35
...
...
@@ -461,7 +461,7 @@ struct glyph_matrix
/* Non-zero means window displayed in this matrix has a top mode
line. */
unsigned
top
_line_p
:
1
;
unsigned
header
_line_p
:
1
;
#ifdef GLYPH_DEBUG
/* A string identifying the method used to display the matrix. */
...
...
@@ -674,7 +674,7 @@ struct glyph_row *matrix_row P_ ((struct glyph_matrix *, int));
This is always the first row in MATRIX because that's the only
way that works in frame-based redisplay. */
#define MATRIX_
TOP
_LINE_ROW(MATRIX) (MATRIX)->rows
#define MATRIX_
HEADER
_LINE_ROW(MATRIX) (MATRIX)->rows
/* Return a pointer to first row in MATRIX used for text display. */
...
...
@@ -744,7 +744,7 @@ struct glyph_row *matrix_row P_ ((struct glyph_matrix *, int));
#define MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P(W, ROW) \
(MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW)) \
&& (ROW)->y < WINDOW_DISPLAY_
TOP
_LINE_HEIGHT ((W)))
&& (ROW)->y < WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT ((W)))
/* Non-zero if ROW is partially visible at the bottom of window W. */
...
...
@@ -863,9 +863,9 @@ extern struct glyph_row scratch_glyph_row;
if not known. This macro is called under circumstances where
MATRIX might not have been allocated yet. */
#define MATRIX_
TOP
_LINE_HEIGHT(MATRIX)
\
#define MATRIX_
HEADER
_LINE_HEIGHT(MATRIX) \
((MATRIX) && (MATRIX)->rows \
? MATRIX_
TOP
_LINE_ROW (MATRIX)->height \
? MATRIX_
HEADER
_LINE_ROW (MATRIX)->height \
: 0)
/* Return the current height of the mode line of window W. If not
...
...
@@ -881,10 +881,10 @@ extern struct glyph_row scratch_glyph_row;
known from W's current glyph matrix, return an estimation based on
the height of the font of the face `top-line'. */
#define CURRENT_
TOP
_LINE_HEIGHT(W) \
(MATRIX_
TOP
_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_
TOP
_LINE_HEIGHT ((W)->current_matrix) \
: estimate_mode_line_height (XFRAME ((W)->frame),
TOP
_LINE_FACE_ID))
#define CURRENT_
HEADER
_LINE_HEIGHT(W) \
(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))
/* Return the height of the desired mode line of window W. */
...
...
@@ -893,8 +893,8 @@ extern struct glyph_row scratch_glyph_row;
/* Return the height of the desired top line of window W. */
#define DESIRED_
TOP
_LINE_HEIGHT(W) \
MATRIX_
TOP
_LINE_HEIGHT ((W)->desired_matrix)
#define DESIRED_
HEADER
_LINE_HEIGHT(W) \
MATRIX_
HEADER
_LINE_HEIGHT ((W)->desired_matrix)
/* Like FRAME_INTERNAL_BORDER_WIDTH but checks whether frame F is a
window-system frame. */
...
...
@@ -930,9 +930,9 @@ extern struct glyph_row scratch_glyph_row;
/* Height in pixels of the top line. Zero if W doesn't have a top
line. */
#define WINDOW_DISPLAY_
TOP
_LINE_HEIGHT(W) \
(WINDOW_WANTS_
TOP
_LINE_P ((W)) \
? CURRENT_
TOP
_LINE_HEIGHT (W) \
#define WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT(W) \
(WINDOW_WANTS_
HEADER
_LINE_P ((W)) \
? CURRENT_
HEADER
_LINE_HEIGHT (W) \
: 0)
/* Pixel height of window W without mode line. */
...
...
@@ -946,7 +946,7 @@ extern struct glyph_row scratch_glyph_row;
#define WINDOW_DISPLAY_TEXT_HEIGHT(W) \
(WINDOW_DISPLAY_PIXEL_HEIGHT ((W)) \
- WINDOW_DISPLAY_MODE_LINE_HEIGHT ((W)) \
- WINDOW_DISPLAY_
TOP
_LINE_HEIGHT ((W)))
- WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT ((W)))
/* Left edge of W in pixels relative to its frame. */
...
...
@@ -1056,11 +1056,11 @@ extern struct glyph_row scratch_glyph_row;
/* Value is non-zero if window W wants a top line. */
#define WINDOW_WANTS_
TOP
_LINE_P(W) \
#define WINDOW_WANTS_
HEADER
_LINE_P(W) \
(!MINI_WINDOW_P (W) \
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (W))) \
&& !NILP (XBUFFER ((W)->buffer)->
top
_line_format))
&& !NILP (XBUFFER ((W)->buffer)->
header
_line_format))
/***********************************************************************
...
...
@@ -1266,7 +1266,7 @@ enum face_id
MODE_LINE_FACE_ID
,
TOOL_BAR_FACE_ID
,
BITMAP_AREA_FACE_ID
,
TOP
_LINE_FACE_ID
,
HEADER
_LINE_FACE_ID
,
BASIC_FACE_ID_SENTINEL
};
...
...
@@ -1473,7 +1473,7 @@ struct it
unsigned
multibyte_p
:
1
;
/* 1 means window has a mode line at its top. */
unsigned
top
_line_p
:
1
;
unsigned
header
_line_p
:
1
;
/* 1 means `string' is the value of a `display' property.
Don't handle some `display' properties in these strings. */
...
...
src/dispnew.c
View file @
045dee35
...
...
@@ -508,18 +508,18 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
int
i
;
int
new_rows
;
int
marginal_areas_changed_p
=
0
;
int
top
_line_changed_p
=
0
;
int
top
_line_p
=
0
;
int
header
_line_changed_p
=
0
;
int
header
_line_p
=
0
;
int
left
=
-
1
,
right
=
-
1
;
int
window_x
,
window_y
,
window_width
,
window_height
;
/* See if W had a top line that has disappeared now, or vice versa. */
if
(
w
)
{
top
_line_p
=
WINDOW_WANTS_
TOP
_LINE_P
(
w
);
top
_line_changed_p
=
top
_line_p
!=
matrix
->
top
_line_p
;
header
_line_p
=
WINDOW_WANTS_
HEADER
_LINE_P
(
w
);
header
_line_changed_p
=
header
_line_p
!=
matrix
->
header
_line_p
;
}
matrix
->
top
_line_p
=
top
_line_p
;
matrix
->
header
_line_p
=
header
_line_p
;
/* Do nothing if MATRIX' size, position, vscroll, and marginal areas
haven't changed. This optimization is important because preserving
...
...
@@ -535,7 +535,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
if
(
!
marginal_areas_changed_p
&&
!
fonts_changed_p
&&
!
top
_line_changed_p
&&
!
header
_line_changed_p
&&
matrix
->
window_top_y
==
XFASTINT
(
w
->
top
)
&&
matrix
->
window_height
==
window_height
&&
matrix
->
window_vscroll
==
w
->
vscroll
...
...
@@ -584,7 +584,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
if
(
w
==
NULL
||
row
==
matrix
->
rows
+
dim
.
height
-
1
||
(
row
==
matrix
->
rows
&&
matrix
->
top
_line_p
))
||
(
row
==
matrix
->
rows
&&
matrix
->
header
_line_p
))
{
row
->
glyphs
[
TEXT_AREA
]
=
row
->
glyphs
[
LEFT_MARGIN_AREA
];
...
...
@@ -613,7 +613,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
its own memory. Allocate glyph memory from the heap. */
if
(
dim
.
width
>
matrix
->
matrix_w
||
new_rows
||
top
_line_changed_p
||
header
_line_changed_p
||
marginal_areas_changed_p
)
{
struct
glyph_row
*
row
=
matrix
->
rows
;
...
...
@@ -628,7 +628,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
/* The mode line never has marginal areas. */
if
(
row
==
matrix
->
rows
+
dim
.
height
-
1
||
(
row
==
matrix
->
rows
&&
matrix
->
top
_line_p
))
||
(
row
==
matrix
->
rows
&&
matrix
->
header
_line_p
))
{
row
->
glyphs
[
TEXT_AREA
]
=
row
->
glyphs
[
LEFT_MARGIN_AREA
];
...
...
@@ -848,7 +848,7 @@ shift_glyph_matrix (w, matrix, start, end, dy)
xassert
(
start
>=
0
&&
start
<
matrix
->
nrows
);
xassert
(
end
>=
0
&&
end
<=
matrix
->
nrows
);
min_y
=
WINDOW_DISPLAY_
TOP
_LINE_HEIGHT
(
w
);
min_y
=
WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT
(
w
);
max_y
=
WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE
(
w
);
for
(;
start
<
end
;
++
start
)
...
...
@@ -998,7 +998,7 @@ blank_row (w, row, y)
{
int
min_y
,
max_y
;
min_y
=
WINDOW_DISPLAY_
TOP
_LINE_HEIGHT
(
w
);
min_y
=
WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT
(
w
);
max_y
=
WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE
(
w
);
clear_glyph_row
(
row
);
...
...
@@ -3602,7 +3602,7 @@ update_window (w, force_p)
{
struct
glyph_row
*
row
,
*
end
;
struct
glyph_row
*
mode_line_row
;
struct
glyph_row
*
top
_line_row
=
NULL
;
struct
glyph_row
*
header
_line_row
=
NULL
;
int
yb
,
changed_p
=
0
;
rif
->
update_window_begin_hook
(
w
);
...
...
@@ -3613,7 +3613,7 @@ update_window (w, force_p)
row
=
desired_matrix
->
rows
;
end
=
row
+
desired_matrix
->
nrows
-
1
;
if
(
row
->
mode_line_p
)
top
_line_row
=
row
++
;
header
_line_row
=
row
++
;
/* Update the mode line, if necessary. */
mode_line_row
=
MATRIX_MODE_LINE_ROW
(
desired_matrix
);
...
...
@@ -3634,7 +3634,7 @@ update_window (w, force_p)
/* Try reusing part of the display by inserting/deleting lines. */
if
(
row
<
end
&&
!
desired_matrix
->
no_scrolling_p
)
{
int
rc
=
scrolling_window
(
w
,
top
_line_row
!=
NULL
);
int
rc
=
scrolling_window
(
w
,
header
_line_row
!=
NULL
);
if
(
rc
<
0
)
{
/* All rows were found to be equal. */
...
...
@@ -3649,9 +3649,9 @@ update_window (w, force_p)
/* Update the top mode line after scrolling because a new top
line would otherwise overwrite lines at the top of the window
that can be scrolled. */
if
(
top
_line_row
&&
top
_line_row
->
enabled_p
)
if
(
header
_line_row
&&
header
_line_row
->
enabled_p
)
{
top
_line_row
->
y
=
0
;
header
_line_row
->
y
=
0
;
update_window_line
(
w
,
0
);
changed_p
=
1
;
}
...
...
@@ -4085,7 +4085,7 @@ set_window_cursor_after_update (w)
/* Try to reuse part of the current display of W by scrolling lines.
TOP
_LINE_P non-zero means W has a top mode line.
HEADER
_LINE_P non-zero means W has a top mode line.
The algorithm is taken from Communications of the ACM, Apr78 "A
Technique for Isolating Differences Between Files." It should take
...
...
@@ -4111,9 +4111,9 @@ set_window_cursor_after_update (w)
1 if we did scroll. */
static
int
scrolling_window
(
w
,
top
_line_p
)
scrolling_window
(
w
,
header
_line_p
)
struct
window
*
w
;
int
top
_line_p
;
int
header
_line_p
;
{
struct
symbol
{
...
...
@@ -4142,7 +4142,7 @@ scrolling_window (w, top_line_p)
int
yb
=
window_text_bottom_y
(
w
);
/* Skip over rows equal at the start. */
i
=
top
_line_p
?
1
:
0
;
i
=
header
_line_p
?
1
:
0
;
while
(
i
<
current_matrix
->
nrows
-
1
&&
MATRIX_ROW_ENABLED_P
(
current_matrix
,
i
)
&&
MATRIX_ROW_ENABLED_P
(
desired_matrix
,
i
)
...
...
@@ -5121,7 +5121,7 @@ mode_line_string (w, x, y, mode_line_p, charpos)
if
(
mode_line_p
)
row
=
MATRIX_MODE_LINE_ROW
(
w
->
current_matrix
);
else
row
=
MATRIX_
TOP
_LINE_ROW
(
w
->
current_matrix
);
row
=
MATRIX_
HEADER
_LINE_ROW
(
w
->
current_matrix
);
if
(
row
->
mode_line_p
&&
row
->
enabled_p
)
{
...
...
src/keyboard.c
View file @
045dee35
...
...
@@ -4281,7 +4281,7 @@ make_lispy_event (event)
Lisp_Object string;
int charpos;
posn = part == 1 ? Qmode_line : Q
top
_line;
posn = part == 1 ? Qmode_line : Q
header
_line;
string = mode_line_string (w, wx, wy, part == 1, &charpos);
if (STRINGP (string))
string_info = Fcons (string, make_number (charpos));
...
...
@@ -4564,7 +4564,7 @@ make_lispy_event (event)
else if (part == 2)
posn = Qvertical_line;
else if (part == 3)
posn = Q
top
_line;
posn = Q
header
_line;
else
XSETINT (posn,
buffer_posn_from_coords (XWINDOW (window),
...
...
@@ -4645,7 +4645,7 @@ make_lispy_event (event)
else if (part == 2)
posn = Qvertical_line;
else if (part == 3)
posn = Q
top
_line;
posn = Q
header
_line;
else
XSETINT (posn, buffer_posn_from_coords (w, &wx, &wy));
}
...
...
@@ -4758,7 +4758,7 @@ make_lispy_movement (frame, bar_window, part, x, y, time)
else if (area == 2)
posn = Qvertical_line;
else if (area == 3)
posn = Q
top
_line;
posn = Q
header
_line;
else
XSETINT (posn, buffer_posn_from_coords (w, &wx, &wy));
}
...
...
src/keyboard.h
View file @
045dee35
...
...
@@ -289,7 +289,7 @@ extern Lisp_Object Qscroll_bar_movement;
(Fget ((event_head), Qevent_kind))
/* Symbols to use for non-text mouse positions. */
extern
Lisp_Object
Qmode_line
,
Qvertical_line
,
Q
top
_line
;
extern
Lisp_Object
Qmode_line
,
Qvertical_line
,
Q
header
_line
;
/* Forward declaration for prototypes. */
struct
input_event
;
...
...
src/window.c
View file @
045dee35
...
...
@@ -480,8 +480,8 @@ coordinates_in_window (w, x, y)
&&
*
y
>=
bottom_y
-
CURRENT_MODE_LINE_HEIGHT
(
w
))
/* On the mode line. */
return
2
;
else
if
(
WINDOW_WANTS_
TOP
_LINE_P
(
w
)
&&
*
y
<
top_y
+
CURRENT_
TOP
_LINE_HEIGHT
(
w
))
else
if
(
WINDOW_WANTS_
HEADER
_LINE_P
(
w
)
&&
*
y
<
top_y
+
CURRENT_
HEADER
_LINE_HEIGHT
(
w
))
/* On the top line. */
return
4
;
else
if
(
*
x
<
left_x
||
*
x
>=
right_x
)
...
...
@@ -519,7 +519,7 @@ frame.\n\
If COORDINATES are in the text portion of WINDOW,
\n
\
the coordinates relative to the window are returned.
\n
\
If they are in the mode line of WINDOW, `mode-line' is returned.
\n
\
If they are in the top mode line of WINDOW, `
top
-line' is returned.
\n
\
If they are in the top mode line of WINDOW, `
header
-line' is returned.
\n
\
If they are in the bitmap-area to the left of the window,
\n
\
`left-bitmap-area' is returned, if they are in the area on the right of
\n
\
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\
return
Qvertical_line
;
case
4
:
return
Q
top
_line
;
return
Q
header
_line
;
case
5
:
return
Qleft_bitmap_area
;
...
...
@@ -2089,7 +2089,7 @@ window_min_size_1 (w, width_p)
{
if
(
MINI_WINDOW_P
(
w
)
||
(
!
WINDOW_WANTS_MODELINE_P
(
w
)
&&
!
WINDOW_WANTS_
TOP
_LINE_P
(
w
)))
&&
!
WINDOW_WANTS_
HEADER
_LINE_P
(
w
)))
size
=
1
;
else
size
=
window_min_height
;
...
...
src/xdisp.c
View file @
045dee35
...
...
@@ -758,8 +758,8 @@ window_box_height (w)
if (WINDOW_WANTS_MODELINE_P (w))
height -= CURRENT_MODE_LINE_HEIGHT (w);
if (WINDOW_WANTS_
TOP
_LINE_P (w))
height -= CURRENT_
TOP
_LINE_HEIGHT (w);
if (WINDOW_WANTS_
HEADER
_LINE_P (w))
height -= CURRENT_
HEADER
_LINE_HEIGHT (w);
return height;
}
...
...
@@ -828,8 +828,8 @@ window_box (w, area, box_x, box_y, box_width, box_height)
*box_x = window_box_left (w, area);
*box_y = (FRAME_INTERNAL_BORDER_WIDTH_SAFE (f)
+ XFASTINT (w->top) * CANON_Y_UNIT (f));
if (WINDOW_WANTS_
TOP
_LINE_P (w))
*box_y += CURRENT_
TOP
_LINE_HEIGHT (w);
if (WINDOW_WANTS_
HEADER
_LINE_P (w))
*box_y += CURRENT_
HEADER
_LINE_HEIGHT (w);
}
...
...
@@ -1159,11 +1159,11 @@ check_window_end (w)
BASE_FACE_ID is the id of a base face to use. It must be one of
DEFAULT_FACE_ID for normal text, MODE_LINE_FACE_ID or
TOP
_LINE_FACE_ID for displaying mode lines, or TOOL_BAR_FACE_ID for
HEADER
_LINE_FACE_ID for displaying mode lines, or TOOL_BAR_FACE_ID for
displaying the tool-bar.
If ROW is null and BASE_FACE_ID is equal to MODE_LINE_FACE_ID or
TOP
_LINE_FACE_ID, the iterator will be initialized to use the
HEADER
_LINE_FACE_ID, the iterator will be initialized to use the
corresponding mode line glyph row of the desired matrix of W. */
void
...
...
@@ -1195,8 +1195,8 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id)
{
if (base_face_id == MODE_LINE_FACE_ID)
row = MATRIX_MODE_LINE_ROW (w->desired_matrix);
else if (base_face_id ==
TOP
_LINE_FACE_ID)
row = MATRIX_
TOP
_LINE_ROW (w->desired_matrix);
else if (base_face_id ==
HEADER
_LINE_FACE_ID)
row = MATRIX_
HEADER
_LINE_ROW (w->desired_matrix);
}
/* Clear IT. */
...
...
@@ -1349,8 +1349,8 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id)
it->last_visible_x -= it->continuation_pixel_width;
}
it->
top
_line_p = WINDOW_WANTS_
TOP
_LINE_P (w);
it->current_y = WINDOW_DISPLAY_
TOP
_LINE_HEIGHT (w) + w->vscroll;
it->
header
_line_p = WINDOW_WANTS_
HEADER
_LINE_P (w);
it->current_y = WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT (w) + w->vscroll;
}
/* Leave room for a border glyph. */
...
...
@@ -1407,7 +1407,7 @@ start_display (it, w, pos)
{
int start_at_line_beg_p;
struct glyph_row *row;
int first_vpos = WINDOW_WANTS_
TOP
_LINE_P (w) ? 1 : 0;
int first_vpos = WINDOW_WANTS_
HEADER
_LINE_P (w) ? 1 : 0;
int first_y;
row = w->desired_matrix->rows + first_vpos;
...
...
@@ -7841,7 +7841,7 @@ make_cursor_line_fully_visible (w)
{
struct glyph_matrix *matrix;
struct glyph_row *row;
int
top
_line_height;
int
header
_line_height;
/* It's not always possible to find the cursor, e.g, when a window
is full of overlay strings. Don't do anything in that case. */
...
...
@@ -7854,8 +7854,8 @@ make_cursor_line_fully_visible (w)
/* If row->y == top y of window display area, the window isn't tall
enough to display a single line. There is nothing we can do
about it. */
top
_line_height = WINDOW_DISPLAY_
TOP
_LINE_HEIGHT (w);
if (row->y ==
top
_line_height)
header
_line_height = WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT (w);
if (row->y ==
header
_line_height)
return;
if (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row))
...
...
@@ -8000,7 +8000,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
{
aggressive = current_buffer->scroll_down_aggressively;
height = (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w)
- WINDOW_DISPLAY_
TOP
_LINE_HEIGHT (w));
- WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT (w));
if (NUMBERP (aggressive))
amount_to_scroll = XFLOATINT (aggressive) * height;
}
...
...
@@ -8053,7 +8053,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
{
aggressive = current_buffer->scroll_up_aggressively;
height = (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (w)
- WINDOW_DISPLAY_
TOP
_LINE_HEIGHT (w));
- WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT (w));
if (NUMBERP (aggressive))
amount_to_scroll = XFLOATINT (aggressive) * height;
}
...
...
@@ -8124,7 +8124,7 @@ compute_window_start_on_continuation_line (w)
/* Find the start of the continued line. This should be fast
because scan_buffer is fast (newline cache). */
row = w->desired_matrix->rows + (WINDOW_WANTS_
TOP
_LINE_P (w) ? 1 : 0);
row = w->desired_matrix->rows + (WINDOW_WANTS_
HEADER
_LINE_P (w) ? 1 : 0);
init_iterator (&it, w, CHARPOS (start_pos), BYTEPOS (start_pos),
row, DEFAULT_FACE_ID);
reseat_at_previous_visible_line_start (&it);
...
...
@@ -8868,7 +8868,7 @@ redisplay_window (window, just_this_one_p)
&& XFASTINT (w->column_number_displayed) != current_column ()))
/* This means that the window has a mode line. */
&& (WINDOW_WANTS_MODELINE_P (w)
|| WINDOW_WANTS_
TOP
_LINE_P (w)))
|| WINDOW_WANTS_
HEADER
_LINE_P (w)))
{
display_mode_lines (w);
...
...
@@ -8884,12 +8884,12 @@ redisplay_window (window, just_this_one_p)
/* If top line height has changed, arrange for a thorough
immediate redisplay using the correct mode line height. */
if (WINDOW_WANTS_
TOP
_LINE_P (w)
&& CURRENT_
TOP
_LINE_HEIGHT (w) != DESIRED_
TOP
_LINE_HEIGHT (w))
if (WINDOW_WANTS_
HEADER
_LINE_P (w)
&& CURRENT_
HEADER
_LINE_HEIGHT (w) != DESIRED_
HEADER
_LINE_HEIGHT (w))
{
fonts_changed_p = 1;
MATRIX_
TOP
_LINE_ROW (w->current_matrix)->height
= DESIRED_
TOP
_LINE_HEIGHT (w);
MATRIX_
HEADER
_LINE_ROW (w->current_matrix)->height
= DESIRED_
HEADER
_LINE_HEIGHT (w);
}
if (fonts_changed_p)
...
...
@@ -9089,8 +9089,8 @@ try_window_reusing_current_matrix (w)
return 0;
/* If top-line visibility has changed, give up. */
if (WINDOW_WANTS_
TOP
_LINE_P (w)
!= MATRIX_
TOP
_LINE_ROW (w->current_matrix)->mode_line_p)
if (WINDOW_WANTS_
HEADER
_LINE_P (w)
!= MATRIX_
HEADER
_LINE_ROW (w->current_matrix)->mode_line_p)
return 0;
/* Give up if old or new display is scrolled vertically. We could
...
...
@@ -9197,7 +9197,7 @@ try_window_reusing_current_matrix (w)
/* Re-compute Y positions. */
row = MATRIX_FIRST_TEXT_ROW (w->current_matrix) + nrows_scrolled;
min_y = WINDOW_DISPLAY_
TOP
_LINE_HEIGHT (w);
min_y = WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT (w);
max_y = it.last_visible_y;
while (row < bottom_row)
{
...
...
@@ -9340,7 +9340,7 @@ try_window_reusing_current_matrix (w)
/* Scroll the display. */
run.current_y = first_reusable_row->y;
run.desired_y = WINDOW_DISPLAY_
TOP
_LINE_HEIGHT (w);
run.desired_y = WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT (w);
run.height = it.last_visible_y - run.current_y;
if (run.height)
{
...
...
@@ -9356,7 +9356,7 @@ try_window_reusing_current_matrix (w)
bottom_row = MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w);
row = first_reusable_row;
dy = first_reusable_row->y;
min_y = WINDOW_DISPLAY_
TOP
_LINE_HEIGHT (w);
min_y = WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT (w);
max_y = it.last_visible_y;
while (row < first_row_to_display)
{
...
...
@@ -10180,13 +10180,13 @@ try_window_id (w)
/* Displayed to end of window, but no line containing text was
displayed. Lines were deleted at the end of the window. */
int vpos;
int
top
_line_p = WINDOW_WANTS_
TOP
_LINE_P (w) ? 1 : 0;
int
header
_line_p = WINDOW_WANTS_
HEADER
_LINE_P (w) ? 1 : 0;
for (vpos = XFASTINT (w->window_end_vpos); vpos > 0; --vpos)
if ((w->desired_matrix->rows[vpos +
top
_line_p].enabled_p
&& w->desired_matrix->rows[vpos +
top
_line_p].displays_text_p)
|| (!w->desired_matrix->rows[vpos +
top
_line_p].enabled_p
&& w->current_matrix->rows[vpos +
top
_line_p].displays_text_p))
if ((w->desired_matrix->rows[vpos +
header
_line_p].enabled_p
&& w->desired_matrix->rows[vpos +
header
_line_p].displays_text_p)
|| (!w->desired_matrix->rows[vpos +
header
_line_p].enabled_p
&& w->current_matrix->rows[vpos +
header
_line_p].displays_text_p))
break;
w->window_end_vpos = make_number (vpos);
...
...
@@ -10538,7 +10538,7 @@ compute_line_metrics (it)
if (FRAME_WINDOW_P (it->f))
{
int i,
top
_line_height;
int i,
header
_line_height;
/* The line may consist of one space only, that was added to
place the cursor on it. If so, the row's height hasn't been
...
...
@@ -10577,9 +10577,9 @@ compute_line_metrics (it)
/* Compute how much of the line is visible. */
row->visible_height = row->height;
top
_line_height = WINDOW_DISPLAY_
TOP
_LINE_HEIGHT (it->w);
if (row->y <
top
_line_height)
row->visible_height -=
top
_line_height - row->y;
header
_line_height = WINDOW_DISPLAY_
HEADER
_LINE_HEIGHT (it->w);
if (row->y <
header
_line_height)
row->visible_height -=
header
_line_height - row->y;
else
{
int max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (it->w);
...
...
@@ -11296,15 +11296,17 @@ display_mode_lines (w)
w->column_number_displayed = Qnil;
if (WINDOW_WANTS_MODELINE_P (w))
display_mode_line (w, MODE_LINE_FACE_ID, current_buffer->mode_line_format);
display_mode_line (w, MODE_LINE_FACE_ID,
current_buffer->mode_line_format);
if (WINDOW_WANTS_TOP_LINE_P (w))
display_mode_line (w, TOP_LINE_FACE_ID, current_buffer->top_line_format);
if (WINDOW_WANTS_HEADER_LINE_P (w))
display_mode_line (w, HEADER_LINE_FACE_ID,
current_buffer->header_line_format);
}
/* Display mode or top line of window W. FACE_ID specifies which line
to display; it is either MODE_LINE_FACE_ID or
TOP
_LINE_FACE_ID.
to display; it is either MODE_LINE_FACE_ID or
HEADER
_LINE_FACE_ID.
FORMAT is the mode line format to display. */
static void
...
...
src/xfaces.c
View file @
045dee35
...
...
@@ -281,7 +281,7 @@ Lisp_Object Qx_charset_registry;
/* Names of basic faces. */
Lisp_Object
Qdefault
,
Qmodeline
,
Qtool_bar
,
Qregion
,
Qmargin
;
Lisp_Object
Q
top
_line
;
Lisp_Object
Q
header
_line
;
/* Default stipple pattern used on monochrome displays. This stipple
pattern is used on monochrome displays instead of shades of gray
...
...
@@ -5132,7 +5132,7 @@ realize_basic_faces (f)
realize_named_face
(
f
,
Qmodeline
,
MODE_LINE_FACE_ID
);
realize_named_face
(
f
,
Qtool_bar
,
TOOL_BAR_FACE_ID
);
realize_named_face
(
f
,
Qmargin
,
BITMAP_AREA_FACE_ID
);
realize_named_face
(
f
,
Q
top
_line
,
TOP
_LINE_FACE_ID
);
realize_named_face
(
f
,
Q
header
_line
,
HEADER
_LINE_FACE_ID
);
success_p
=
1
;
}
...
...
@@ -5954,7 +5954,7 @@ face_at_buffer_position (w, pos, region_beg, region_end,
REGION_BEG and REGION_END give the start and end positions of the
region; both are -1 if no region is visible. BASE_FACE_ID is the
id of the basic face to merge with. It is usually equal to
DEFAULT_FACE_ID but can be MODE_LINE_FACE_ID or
TOP
_LINE_FACE_ID
DEFAULT_FACE_ID but can be MODE_LINE_FACE_ID or
HEADER
_LINE_FACE_ID
for strings displayed in the mode or top line.
Set *ENDPTR to the next position where to check for faces in
...
...
@@ -6248,8 +6248,8 @@ syms_of_xfaces ()
staticpro
(
&
Qregion
);
Qmargin
=
intern
(
"margin"
);