aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2013-09-08 21:17:12 +0900
committerKenichi Handa2013-09-08 21:17:12 +0900
commit3aff2f57cc348b90c0f8b5926027cd0f0f378070 (patch)
treeff714b2645779c262a714ed7ae1d97a155d21438 /src
parent0ca754d0d8df545ce4c09d65a337f67213e2f82b (diff)
parente8dd0787d9c19e81344552d185e9008031f58723 (diff)
downloademacs-3aff2f57cc348b90c0f8b5926027cd0f0f378070.tar.gz
emacs-3aff2f57cc348b90c0f8b5926027cd0f0f378070.zip
merge trunk
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog82
-rw-r--r--src/dispextern.h52
-rw-r--r--src/dispnew.c45
-rw-r--r--src/eval.c7
-rw-r--r--src/font.c6
-rw-r--r--src/frame.c4
-rw-r--r--src/frame.h7
-rw-r--r--src/gfilenotify.c2
-rw-r--r--src/lisp.h3
-rw-r--r--src/term.c19
-rw-r--r--src/w32fns.c8
-rw-r--r--src/window.c23
-rw-r--r--src/window.h6
-rw-r--r--src/xdisp.c249
-rw-r--r--src/xfns.c8
15 files changed, 276 insertions, 245 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d4a7abefd57..7f4c3f731f4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,85 @@
12013-09-07 Paul Eggert <eggert@cs.ucla.edu>
2
3 Port --without-x --enable-gcc-warnings to Fedora 19.
4 * gfilenotify.c (globals_of_gfilenotify):
5 Call g_type_init only if using an older glib version that needs it.
6
72013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
8
9 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
10 (last_glyphless_glyph_merged_face_id): Remove declarations.
11 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
12 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
13 (last_glyphless_glyph_merged_face_id): Now static.
14 (merge_escape_glyph_face): New function, refactored from...
15 (get_next_display_element): ...here.
16 (merge_glyphless_glyph_face): New function, refactored from...
17 (produce_glyphless_glyph): ...here...
18 * term.c (produce_glyphless_glyph): ...and here.
19
202013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
21
22 * eval.c (eval_sub): Only call Ffunction if necessary.
23
242013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
25
26 Attempt to make redisplay more selective when changing cursor type.
27 * frame.h (struct frame): New bitfield cursor_type_changed.
28 * xdisp.c (cursor_type_changed): Remove.
29 (try_cursor_movement, redisplay_window, try_window_id)
30 (set_frame_cursor_types, try_window_reusing_current_matrix):
31 Adjust to use per-frame bitfield.
32 (redisplay_internal): Look for cursor type change on each visible
33 frame and consider all frames if cursor type has been changed on
34 the frame other than selected. If cursor type has been changed on
35 selected frame only, do not use fast update.
36
372013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
38
39 Attempt to make redisplay more selective when changing fonts.
40 * frame.h (struct frame): New bitfield fonts_changed.
41 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
42 (adjust_frame_glyphs): Add prototype.
43 * dispnew.c (fonts_changed_p): Remove.
44 (adjust_glyphs): Remove because we do not
45 adjust matrices on all frames at once any more.
46 (adjust_frame_glyphs): Block and unblock input here.
47 (adjust_glyph_matrix): Use fonts_changed.
48 (change_frame_size_1): Use adjust_frame_glyphs.
49 * font.c (font_open_entity): Use fonts_changed.
50 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
51 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
52 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
53 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
54 (shrink_mini_window, Fresize_mini_window_internal)
55 (window_scroll_pixel_based, Fset_window_configuration)
56 (apply_window_adjustment, Fset_window_vscroll):
57 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
58 Use adjust_frame_glyphs.
59 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
60 (try_window_reusing_current_matrix, try_window_id, display_line)
61 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
62 (redisplay_internal): Consider fonts_changed and adjust frame
63 matrices for each frame only if the frame is visible. If font
64 has been changed on some frame during full redisplay, retry
65 only visible frames where the font has been actually changed.
66
672013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
68
69 Cache current header and mode line height for each window.
70 * window.h (struct window): New fields mode_line_height
71 and header_line_height.
72 * window.c (make_window): Initialize them.
73 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
74 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
75 (current_mode_line_height, current_header_line_height):
76 Remove declaration.
77 * xdisp.c (current_mode_line_height, current_header_line_height):
78 Remove.
79 (pos_visible_p, init_xdisp): Adjust user.
80 (redisplay_window): Invalidate mode_line_height and
81 header_line_height if current and desired matrices do not agree.
82
12013-09-05 Dmitry Antipov <dmantipov@yandex.ru> 832013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2 84
3 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER. 85 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
diff --git a/src/dispextern.h b/src/dispextern.h
index 947e50fa4dd..f15da1e6564 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1195,12 +1195,6 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
1195 ((ROW)->phys_height - (ROW)->phys_ascent \ 1195 ((ROW)->phys_height - (ROW)->phys_ascent \
1196 > (ROW)->height - (ROW)->ascent) 1196 > (ROW)->height - (ROW)->ascent)
1197 1197
1198/* True means that fonts have been loaded since the last glyph
1199 matrix adjustments. The function redisplay_internal adjusts glyph
1200 matrices when this flag is true. */
1201
1202extern bool fonts_changed_p;
1203
1204/* A glyph for a space. */ 1198/* A glyph for a space. */
1205 1199
1206extern struct glyph space_glyph; 1200extern struct glyph space_glyph;
@@ -1428,31 +1422,31 @@ struct glyph_string
1428#define CURRENT_MODE_LINE_FACE_ID(W) \ 1422#define CURRENT_MODE_LINE_FACE_ID(W) \
1429 (CURRENT_MODE_LINE_FACE_ID_3((W), XWINDOW (selected_window), (W))) 1423 (CURRENT_MODE_LINE_FACE_ID_3((W), XWINDOW (selected_window), (W)))
1430 1424
1431/* Return the current height of the mode line of window W. If not 1425/* Return the current height of the mode line of window W. If not known
1432 known from current_mode_line_height, look at W's current glyph 1426 from W->mode_line_height, look at W's current glyph matrix, or return
1433 matrix, or return a default based on the height of the font of the 1427 a default based on the height of the font of the face `mode-line'. */
1434 face `mode-line'. */
1435 1428
1436#define CURRENT_MODE_LINE_HEIGHT(W) \ 1429#define CURRENT_MODE_LINE_HEIGHT(W) \
1437 (current_mode_line_height >= 0 \ 1430 (W->mode_line_height >= 0 \
1438 ? current_mode_line_height \ 1431 ? W->mode_line_height \
1439 : (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ 1432 : (W->mode_line_height \
1440 ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ 1433 = (MATRIX_MODE_LINE_HEIGHT (W->current_matrix) \
1441 : estimate_mode_line_height (XFRAME ((W)->frame), \ 1434 ? MATRIX_MODE_LINE_HEIGHT (W->current_matrix) \
1442 CURRENT_MODE_LINE_FACE_ID (W)))) 1435 : estimate_mode_line_height \
1436 (XFRAME (W->frame), CURRENT_MODE_LINE_FACE_ID (W)))))
1443 1437
1444/* Return the current height of the header line of window W. If not 1438/* Return the current height of the header line of window W. If not known
1445 known from current_header_line_height, look at W's current glyph 1439 from W->header_line_height, look at W's current glyph matrix, or return
1446 matrix, or return an estimation based on the height of the font of 1440 an estimation based on the height of the font of the face `header-line'. */
1447 the face `header-line'. */
1448 1441
1449#define CURRENT_HEADER_LINE_HEIGHT(W) \ 1442#define CURRENT_HEADER_LINE_HEIGHT(W) \
1450 (current_header_line_height >= 0 \ 1443 (W->header_line_height >= 0 \
1451 ? current_header_line_height \ 1444 ? W->header_line_height \
1452 : (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ 1445 : (W->header_line_height \
1453 ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ 1446 = (MATRIX_HEADER_LINE_HEIGHT (W->current_matrix) \
1454 : estimate_mode_line_height (XFRAME ((W)->frame), \ 1447 ? MATRIX_HEADER_LINE_HEIGHT (W->current_matrix) \
1455 HEADER_LINE_FACE_ID))) 1448 : estimate_mode_line_height \
1449 (XFRAME (W->frame), HEADER_LINE_FACE_ID))))
1456 1450
1457/* Return the height of the desired mode line of window W. */ 1451/* Return the height of the desired mode line of window W. */
1458 1452
@@ -3201,7 +3195,6 @@ int frame_mode_line_height (struct frame *);
3201extern Lisp_Object Qtool_bar; 3195extern Lisp_Object Qtool_bar;
3202extern bool redisplaying_p; 3196extern bool redisplaying_p;
3203extern int help_echo_showing_p; 3197extern int help_echo_showing_p;
3204extern int current_mode_line_height, current_header_line_height;
3205extern Lisp_Object help_echo_string, help_echo_window; 3198extern Lisp_Object help_echo_string, help_echo_window;
3206extern Lisp_Object help_echo_object, previous_help_echo_string; 3199extern Lisp_Object help_echo_object, previous_help_echo_string;
3207extern ptrdiff_t help_echo_pos; 3200extern ptrdiff_t help_echo_pos;
@@ -3215,6 +3208,7 @@ extern ptrdiff_t compute_display_string_pos (struct text_pos *,
3215extern ptrdiff_t compute_display_string_end (ptrdiff_t, 3208extern ptrdiff_t compute_display_string_end (ptrdiff_t,
3216 struct bidi_string_data *); 3209 struct bidi_string_data *);
3217extern void produce_stretch_glyph (struct it *); 3210extern void produce_stretch_glyph (struct it *);
3211extern int merge_glyphless_glyph_face (struct it *);
3218 3212
3219#ifdef HAVE_WINDOW_SYSTEM 3213#ifdef HAVE_WINDOW_SYSTEM
3220 3214
@@ -3455,7 +3449,7 @@ extern void cancel_line (int, struct frame *);
3455extern void init_desired_glyphs (struct frame *); 3449extern void init_desired_glyphs (struct frame *);
3456extern bool update_frame (struct frame *, bool, bool); 3450extern bool update_frame (struct frame *, bool, bool);
3457extern void bitch_at_user (void); 3451extern void bitch_at_user (void);
3458void adjust_glyphs (struct frame *); 3452extern void adjust_frame_glyphs (struct frame *);
3459void free_glyphs (struct frame *); 3453void free_glyphs (struct frame *);
3460void free_window_matrices (struct window *); 3454void free_window_matrices (struct window *);
3461void check_glyph_memory (void); 3455void check_glyph_memory (void);
diff --git a/src/dispnew.c b/src/dispnew.c
index 1d7cad13e6d..00abf65248c 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -77,7 +77,6 @@ struct dim
77static void update_frame_line (struct frame *, int); 77static void update_frame_line (struct frame *, int);
78static int required_matrix_height (struct window *); 78static int required_matrix_height (struct window *);
79static int required_matrix_width (struct window *); 79static int required_matrix_width (struct window *);
80static void adjust_frame_glyphs (struct frame *);
81static void change_frame_size_1 (struct frame *, int, int, bool, bool, bool); 80static void change_frame_size_1 (struct frame *, int, int, bool, bool, bool);
82static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t); 81static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t);
83static void fill_up_frame_row_with_spaces (struct glyph_row *, int); 82static void fill_up_frame_row_with_spaces (struct glyph_row *, int);
@@ -152,16 +151,6 @@ static int glyph_pool_count;
152 151
153static struct frame *frame_matrix_frame; 152static struct frame *frame_matrix_frame;
154 153
155/* True means that fonts have been loaded since the last glyph
156 matrix adjustments. Redisplay must stop, and glyph matrices must
157 be adjusted when this flag becomes true during display. The
158 reason fonts can be loaded so late is that fonts of fontsets are
159 loaded on demand. Another reason is that a line contains many
160 characters displayed by zero width or very narrow glyphs of
161 variable-width fonts. */
162
163bool fonts_changed_p;
164
165/* Convert vpos and hpos from frame to window and vice versa. 154/* Convert vpos and hpos from frame to window and vice versa.
166 This may only be used for terminal frames. */ 155 This may only be used for terminal frames. */
167 156
@@ -433,7 +422,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
433 || right != matrix->right_margin_glyphs); 422 || right != matrix->right_margin_glyphs);
434 423
435 if (!marginal_areas_changed_p 424 if (!marginal_areas_changed_p
436 && !fonts_changed_p 425 && !XFRAME (w->frame)->fonts_changed
437 && !header_line_changed_p 426 && !header_line_changed_p
438 && matrix->window_left_col == WINDOW_LEFT_EDGE_COL (w) 427 && matrix->window_left_col == WINDOW_LEFT_EDGE_COL (w)
439 && matrix->window_top_line == WINDOW_TOP_EDGE_LINE (w) 428 && matrix->window_top_line == WINDOW_TOP_EDGE_LINE (w)
@@ -1799,37 +1788,17 @@ allocate_matrices_for_window_redisplay (struct window *w)
1799 } 1788 }
1800} 1789}
1801 1790
1802 1791/* Allocate/reallocate glyph matrices of a single frame F.
1803/* Re-allocate/ re-compute glyph matrices on frame F. If F is null, 1792 This function must be called when a new frame is created,
1804 do it for all frames; otherwise do it just for the given frame. 1793 its size changes, or its window configuration changes. */
1805 This function must be called when a new frame is created, its size
1806 changes, or its window configuration changes. */
1807 1794
1808void 1795void
1809adjust_glyphs (struct frame *f) 1796adjust_frame_glyphs (struct frame *f)
1810{ 1797{
1811 /* Block input so that expose events and other events that access 1798 /* Block input so that expose events and other events that access
1812 glyph matrices are not processed while we are changing them. */ 1799 glyph matrices are not processed while we are changing them. */
1813 block_input (); 1800 block_input ();
1814 1801
1815 if (f)
1816 adjust_frame_glyphs (f);
1817 else
1818 {
1819 Lisp_Object tail, lisp_frame;
1820
1821 FOR_EACH_FRAME (tail, lisp_frame)
1822 adjust_frame_glyphs (XFRAME (lisp_frame));
1823 }
1824
1825 unblock_input ();
1826}
1827
1828/* Allocate/reallocate glyph matrices of a single frame F. */
1829
1830static void
1831adjust_frame_glyphs (struct frame *f)
1832{
1833 if (FRAME_WINDOW_P (f)) 1802 if (FRAME_WINDOW_P (f))
1834 adjust_frame_glyphs_for_window_redisplay (f); 1803 adjust_frame_glyphs_for_window_redisplay (f);
1835 else 1804 else
@@ -1839,6 +1808,8 @@ adjust_frame_glyphs (struct frame *f)
1839 adjust_decode_mode_spec_buffer (f); 1808 adjust_decode_mode_spec_buffer (f);
1840 1809
1841 f->glyphs_initialized_p = 1; 1810 f->glyphs_initialized_p = 1;
1811
1812 unblock_input ();
1842} 1813}
1843 1814
1844/* Return true if any window in the tree has nonzero window margins. See 1815/* Return true if any window in the tree has nonzero window margins. See
@@ -5546,7 +5517,7 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth,
5546 w->cursor.vpos = w->cursor.y = 0; 5517 w->cursor.vpos = w->cursor.y = 0;
5547 } 5518 }
5548 5519
5549 adjust_glyphs (f); 5520 adjust_frame_glyphs (f);
5550 calculate_costs (f); 5521 calculate_costs (f);
5551 SET_FRAME_GARBAGED (f); 5522 SET_FRAME_GARBAGED (f);
5552 f->resized_p = 1; 5523 f->resized_p = 1;
diff --git a/src/eval.c b/src/eval.c
index 1ce14ae94a6..9db4d1fd81b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2146,11 +2146,10 @@ eval_sub (Lisp_Object form)
2146 2146
2147 /* Optimize for no indirection. */ 2147 /* Optimize for no indirection. */
2148 fun = original_fun; 2148 fun = original_fun;
2149 if (SYMBOLP (fun) && !NILP (fun) 2149 if (!SYMBOLP (fun))
2150 && (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
2151 fun = indirect_function (fun);
2152 else
2153 fun = Ffunction (Fcons (fun, Qnil)); 2150 fun = Ffunction (Fcons (fun, Qnil));
2151 else if (!NILP (fun) && (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
2152 fun = indirect_function (fun);
2154 2153
2155 if (SUBRP (fun)) 2154 if (SUBRP (fun))
2156 { 2155 {
diff --git a/src/font.c b/src/font.c
index 49398e1b876..2606a25dff8 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2866,14 +2866,14 @@ font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size)
2866 { 2866 {
2867 FRAME_SMALLEST_CHAR_WIDTH (f) = min_width; 2867 FRAME_SMALLEST_CHAR_WIDTH (f) = min_width;
2868 FRAME_SMALLEST_FONT_HEIGHT (f) = height; 2868 FRAME_SMALLEST_FONT_HEIGHT (f) = height;
2869 fonts_changed_p = 1; 2869 f->fonts_changed = 1;
2870 } 2870 }
2871 else 2871 else
2872 { 2872 {
2873 if (FRAME_SMALLEST_CHAR_WIDTH (f) > min_width) 2873 if (FRAME_SMALLEST_CHAR_WIDTH (f) > min_width)
2874 FRAME_SMALLEST_CHAR_WIDTH (f) = min_width, fonts_changed_p = 1; 2874 FRAME_SMALLEST_CHAR_WIDTH (f) = min_width, f->fonts_changed = 1;
2875 if (FRAME_SMALLEST_FONT_HEIGHT (f) > height) 2875 if (FRAME_SMALLEST_FONT_HEIGHT (f) > height)
2876 FRAME_SMALLEST_FONT_HEIGHT (f) = height, fonts_changed_p = 1; 2876 FRAME_SMALLEST_FONT_HEIGHT (f) = height, f->fonts_changed = 1;
2877 } 2877 }
2878#endif 2878#endif
2879 2879
diff --git a/src/frame.c b/src/frame.c
index b4638ed53c8..0f1560df157 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -224,7 +224,7 @@ set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
224 FRAME_WINDOW_SIZES_CHANGED (f) = 1; 224 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
225 FRAME_MENU_BAR_LINES (f) = nlines; 225 FRAME_MENU_BAR_LINES (f) = nlines;
226 set_menu_bar_lines_1 (f->root_window, nlines - olines); 226 set_menu_bar_lines_1 (f->root_window, nlines - olines);
227 adjust_glyphs (f); 227 adjust_frame_glyphs (f);
228 } 228 }
229} 229}
230 230
@@ -712,7 +712,7 @@ affects all frames on the same terminal device. */)
712 change_frame_size (f, height, width, 0, 0, 0); 712 change_frame_size (f, height, width, 0, 0, 0);
713 } 713 }
714 714
715 adjust_glyphs (f); 715 adjust_frame_glyphs (f);
716 calculate_costs (f); 716 calculate_costs (f);
717 XSETFRAME (frame, f); 717 XSETFRAME (frame, f);
718 718
diff --git a/src/frame.h b/src/frame.h
index 17b6089120a..3dfbac15709 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -210,6 +210,13 @@ struct frame
210 unsigned external_tool_bar : 1; 210 unsigned external_tool_bar : 1;
211#endif 211#endif
212 212
213 /* Nonzero means that fonts have been loaded since the last glyph
214 matrix adjustments. */
215 unsigned fonts_changed : 1;
216
217 /* Nonzero means that cursor type has been changed. */
218 unsigned cursor_type_changed : 1;
219
213 /* Margin at the top of the frame. Used to display the tool-bar. */ 220 /* Margin at the top of the frame. Used to display the tool-bar. */
214 int tool_bar_lines; 221 int tool_bar_lines;
215 222
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index 8f13c72df81..7415c3a2413 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -249,7 +249,9 @@ WATCH-DESCRIPTOR should be an object returned by `gfile-add-watch'. */)
249void 249void
250globals_of_gfilenotify (void) 250globals_of_gfilenotify (void)
251{ 251{
252#if ! GLIB_CHECK_VERSION (2, 36, 0)
252 g_type_init (); 253 g_type_init ();
254#endif
253 watch_list = Qnil; 255 watch_list = Qnil;
254} 256}
255 257
diff --git a/src/lisp.h b/src/lisp.h
index 27359ffeb3f..38b538d9bc2 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3359,9 +3359,6 @@ extern Lisp_Object Qglyphless_char;
3359extern Lisp_Object QCdata, QCfile; 3359extern Lisp_Object QCdata, QCfile;
3360extern Lisp_Object QCmap; 3360extern Lisp_Object QCmap;
3361extern Lisp_Object Qrisky_local_variable; 3361extern Lisp_Object Qrisky_local_variable;
3362extern struct frame *last_glyphless_glyph_frame;
3363extern int last_glyphless_glyph_face_id;
3364extern int last_glyphless_glyph_merged_face_id;
3365extern int noninteractive_need_newline; 3362extern int noninteractive_need_newline;
3366extern Lisp_Object echo_area_buffer[2]; 3363extern Lisp_Object echo_area_buffer[2];
3367extern void add_to_log (const char *, Lisp_Object, Lisp_Object); 3364extern void add_to_log (const char *, Lisp_Object, Lisp_Object);
diff --git a/src/term.c b/src/term.c
index aa61fde06ee..0270c1eefa6 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1800,27 +1800,10 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str)
1800static void 1800static void
1801produce_glyphless_glyph (struct it *it, Lisp_Object acronym) 1801produce_glyphless_glyph (struct it *it, Lisp_Object acronym)
1802{ 1802{
1803 int face_id; 1803 int len, face_id = merge_glyphless_glyph_face (it);
1804 int len;
1805 char buf[sizeof "\\x" + max (6, (sizeof it->c * CHAR_BIT + 3) / 4)]; 1804 char buf[sizeof "\\x" + max (6, (sizeof it->c * CHAR_BIT + 3) / 4)];
1806 char const *str = " "; 1805 char const *str = " ";
1807 1806
1808 /* Get a face ID for the glyph by utilizing a cache (the same way as
1809 done for `escape-glyph' in get_next_display_element). */
1810 if (it->f == last_glyphless_glyph_frame
1811 && it->face_id == last_glyphless_glyph_face_id)
1812 {
1813 face_id = last_glyphless_glyph_merged_face_id;
1814 }
1815 else
1816 {
1817 /* Merge the `glyphless-char' face into the current face. */
1818 face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
1819 last_glyphless_glyph_frame = it->f;
1820 last_glyphless_glyph_face_id = it->face_id;
1821 last_glyphless_glyph_merged_face_id = face_id;
1822 }
1823
1824 if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE) 1807 if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE)
1825 { 1808 {
1826 /* As there's no way to produce a thin space, we produce a space 1809 /* As there's no way to produce a thin space, we produce a space
diff --git a/src/w32fns.c b/src/w32fns.c
index b8c445a3a36..58c63d959ef 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1637,7 +1637,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1637 x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); 1637 x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
1638 do_pending_window_change (0); 1638 do_pending_window_change (0);
1639 } 1639 }
1640 adjust_glyphs (f); 1640 adjust_frame_glyphs (f);
1641} 1641}
1642 1642
1643 1643
@@ -1679,7 +1679,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1679 1679
1680 FRAME_TOOL_BAR_LINES (f) = nlines; 1680 FRAME_TOOL_BAR_LINES (f) = nlines;
1681 resize_frame_windows (f, FRAME_LINES (f), 0); 1681 resize_frame_windows (f, FRAME_LINES (f), 0);
1682 adjust_glyphs (f); 1682 adjust_frame_glyphs (f);
1683 1683
1684 /* We also have to make sure that the internal border at the top of 1684 /* We also have to make sure that the internal border at the top of
1685 the frame, below the menu bar or tool bar, is redrawn when the 1685 the frame, below the menu bar or tool bar, is redrawn when the
@@ -6059,7 +6059,7 @@ Text larger than the specified size is clipped. */)
6059 } 6059 }
6060 6060
6061 FRAME_TOTAL_COLS (f) = WINDOW_TOTAL_COLS (w); 6061 FRAME_TOTAL_COLS (f) = WINDOW_TOTAL_COLS (w);
6062 adjust_glyphs (f); 6062 adjust_frame_glyphs (f);
6063 w->pseudo_window_p = 1; 6063 w->pseudo_window_p = 1;
6064 6064
6065 /* Display the tooltip text in a temporary buffer. */ 6065 /* Display the tooltip text in a temporary buffer. */
@@ -6128,7 +6128,7 @@ Text larger than the specified size is clipped. */)
6128 width /= WINDOW_FRAME_COLUMN_WIDTH (w); 6128 width /= WINDOW_FRAME_COLUMN_WIDTH (w);
6129 w->total_cols = width; 6129 w->total_cols = width;
6130 FRAME_TOTAL_COLS (f) = width; 6130 FRAME_TOTAL_COLS (f) = width;
6131 adjust_glyphs (f); 6131 adjust_frame_glyphs (f);
6132 w->pseudo_window_p = 1; 6132 w->pseudo_window_p = 1;
6133 clear_glyph_matrix (w->desired_matrix); 6133 clear_glyph_matrix (w->desired_matrix);
6134 clear_glyph_matrix (w->current_matrix); 6134 clear_glyph_matrix (w->current_matrix);
diff --git a/src/window.c b/src/window.c
index d8a6976e090..6a52ed7e166 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2945,7 +2945,7 @@ window-start value is reasonable when this function is called. */)
2945 } 2945 }
2946 } 2946 }
2947 2947
2948 adjust_glyphs (f); 2948 adjust_frame_glyphs (f);
2949 unblock_input (); 2949 unblock_input ();
2950 2950
2951 run_window_configuration_change_hook (f); 2951 run_window_configuration_change_hook (f);
@@ -3419,6 +3419,7 @@ make_window (void)
3419 non-Lisp data, so do it only for slots which should not be zero. */ 3419 non-Lisp data, so do it only for slots which should not be zero. */
3420 w->nrows_scale_factor = w->ncols_scale_factor = 1; 3420 w->nrows_scale_factor = w->ncols_scale_factor = 1;
3421 w->left_fringe_width = w->right_fringe_width = -1; 3421 w->left_fringe_width = w->right_fringe_width = -1;
3422 w->mode_line_height = w->header_line_height = -1;
3422 w->phys_cursor_type = -1; 3423 w->phys_cursor_type = -1;
3423 w->phys_cursor_width = -1; 3424 w->phys_cursor_width = -1;
3424 w->scroll_bar_width = -1; 3425 w->scroll_bar_width = -1;
@@ -3644,7 +3645,7 @@ be applied on the Elisp level. */)
3644 windows_or_buffers_changed++; 3645 windows_or_buffers_changed++;
3645 FRAME_WINDOW_SIZES_CHANGED (f) = 1; 3646 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
3646 3647
3647 adjust_glyphs (f); 3648 adjust_frame_glyphs (f);
3648 unblock_input (); 3649 unblock_input ();
3649 3650
3650 run_window_configuration_change_hook (f); 3651 run_window_configuration_change_hook (f);
@@ -3914,7 +3915,7 @@ set correctly. See the code of `split-window' for how this is done. */)
3914 3915
3915 block_input (); 3916 block_input ();
3916 window_resize_apply (p, horflag); 3917 window_resize_apply (p, horflag);
3917 adjust_glyphs (f); 3918 adjust_frame_glyphs (f);
3918 /* Set buffer of NEW to buffer of reference window. Don't run 3919 /* Set buffer of NEW to buffer of reference window. Don't run
3919 any hooks. */ 3920 any hooks. */
3920 set_window_buffer (new, r->contents, 0, 1); 3921 set_window_buffer (new, r->contents, 0, 1);
@@ -4043,7 +4044,7 @@ Signal an error when WINDOW is the only window on its frame. */)
4043 recombine_windows (sibling); 4044 recombine_windows (sibling);
4044 } 4045 }
4045 4046
4046 adjust_glyphs (f); 4047 adjust_frame_glyphs (f);
4047 4048
4048 if (!WINDOW_LIVE_P (FRAME_SELECTED_WINDOW (f))) 4049 if (!WINDOW_LIVE_P (FRAME_SELECTED_WINDOW (f)))
4049 /* We deleted the frame's selected window. */ 4050 /* We deleted the frame's selected window. */
@@ -4130,7 +4131,7 @@ grow_mini_window (struct window *w, int delta)
4130 w->total_lines -= XINT (value); 4131 w->total_lines -= XINT (value);
4131 /* Enforce full redisplay. FIXME: make it more selective. */ 4132 /* Enforce full redisplay. FIXME: make it more selective. */
4132 windows_or_buffers_changed++; 4133 windows_or_buffers_changed++;
4133 adjust_glyphs (f); 4134 adjust_frame_glyphs (f);
4134 unblock_input (); 4135 unblock_input ();
4135 } 4136 }
4136} 4137}
@@ -4164,7 +4165,7 @@ shrink_mini_window (struct window *w)
4164 w->total_lines = 1; 4165 w->total_lines = 1;
4165 /* Enforce full redisplay. FIXME: make it more selective. */ 4166 /* Enforce full redisplay. FIXME: make it more selective. */
4166 windows_or_buffers_changed++; 4167 windows_or_buffers_changed++;
4167 adjust_glyphs (f); 4168 adjust_frame_glyphs (f);
4168 unblock_input (); 4169 unblock_input ();
4169 } 4170 }
4170 /* If the above failed for whatever strange reason we must make a 4171 /* If the above failed for whatever strange reason we must make a
@@ -4205,7 +4206,7 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini
4205 4206
4206 windows_or_buffers_changed++; 4207 windows_or_buffers_changed++;
4207 FRAME_WINDOW_SIZES_CHANGED (f) = 1; 4208 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
4208 adjust_glyphs (f); 4209 adjust_frame_glyphs (f);
4209 unblock_input (); 4210 unblock_input ();
4210 4211
4211 run_window_configuration_change_hook (f); 4212 run_window_configuration_change_hook (f);
@@ -4476,7 +4477,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
4476 visible. */ 4477 visible. */
4477 w->vscroll = (it.last_visible_y 4478 w->vscroll = (it.last_visible_y
4478 - it.current_y + it.max_ascent + it.max_descent); 4479 - it.current_y + it.max_ascent + it.max_descent);
4479 adjust_glyphs (it.f); 4480 adjust_frame_glyphs (it.f);
4480 } 4481 }
4481 else 4482 else
4482 { 4483 {
@@ -5753,7 +5754,7 @@ the return value is nil. Otherwise the value is t. */)
5753 ++n; 5754 ++n;
5754 } 5755 }
5755 5756
5756 adjust_glyphs (f); 5757 adjust_frame_glyphs (f);
5757 unblock_input (); 5758 unblock_input ();
5758 5759
5759 /* Scan dead buffer windows. */ 5760 /* Scan dead buffer windows. */
@@ -6082,7 +6083,7 @@ apply_window_adjustment (struct window *w)
6082 clear_glyph_matrix (w->current_matrix); 6083 clear_glyph_matrix (w->current_matrix);
6083 w->window_end_valid = 0; 6084 w->window_end_valid = 0;
6084 windows_or_buffers_changed++; 6085 windows_or_buffers_changed++;
6085 adjust_glyphs (XFRAME (WINDOW_FRAME (w))); 6086 adjust_frame_glyphs (XFRAME (WINDOW_FRAME (w)));
6086} 6087}
6087 6088
6088 6089
@@ -6348,7 +6349,7 @@ If PIXELS-P is non-nil, the return value is VSCROLL. */)
6348 /* Adjust glyph matrix of the frame if the virtual display 6349 /* Adjust glyph matrix of the frame if the virtual display
6349 area becomes larger than before. */ 6350 area becomes larger than before. */
6350 if (w->vscroll < 0 && w->vscroll < old_dy) 6351 if (w->vscroll < 0 && w->vscroll < old_dy)
6351 adjust_glyphs (f); 6352 adjust_frame_glyphs (f);
6352 6353
6353 /* Prevent redisplay shortcuts. */ 6354 /* Prevent redisplay shortcuts. */
6354 XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1; 6355 XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1;
diff --git a/src/window.h b/src/window.h
index efe03737052..f5ae81149b3 100644
--- a/src/window.h
+++ b/src/window.h
@@ -264,6 +264,12 @@ struct window
264 A value of -1 means use frame values. */ 264 A value of -1 means use frame values. */
265 int scroll_bar_width; 265 int scroll_bar_width;
266 266
267 /* Effective height of the mode line, or -1 if not known. */
268 int mode_line_height;
269
270 /* Effective height of the header line, or -1 if not known. */
271 int header_line_height;
272
267 /* Z - the buffer position of the last glyph in the current 273 /* Z - the buffer position of the last glyph in the current
268 matrix of W. Only valid if window_end_valid is nonzero. */ 274 matrix of W. Only valid if window_end_valid is nonzero. */
269 ptrdiff_t window_end_pos; 275 ptrdiff_t window_end_pos;
diff --git a/src/xdisp.c b/src/xdisp.c
index c096fcd340f..d5def065936 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -512,10 +512,6 @@ int update_mode_lines;
512 512
513int windows_or_buffers_changed; 513int windows_or_buffers_changed;
514 514
515/* Nonzero means a frame's cursor type has been changed. */
516
517static int cursor_type_changed;
518
519/* Nonzero after display_mode_line if %l was used and it displayed a 515/* Nonzero after display_mode_line if %l was used and it displayed a
520 line number. */ 516 line number. */
521 517
@@ -573,12 +569,6 @@ static int last_height;
573 569
574int help_echo_showing_p; 570int help_echo_showing_p;
575 571
576/* If >= 0, computed, exact values of mode-line and header-line height
577 to use in the macros CURRENT_MODE_LINE_HEIGHT and
578 CURRENT_HEADER_LINE_HEIGHT. */
579
580int current_mode_line_height, current_header_line_height;
581
582/* The maximum distance to look ahead for text properties. Values 572/* The maximum distance to look ahead for text properties. Values
583 that are too small let us call compute_char_face and similar 573 that are too small let us call compute_char_face and similar
584 functions too often which is expensive. Values that are too large 574 functions too often which is expensive. Values that are too large
@@ -1349,12 +1339,12 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
1349 1339
1350 /* Compute exact mode line heights. */ 1340 /* Compute exact mode line heights. */
1351 if (WINDOW_WANTS_MODELINE_P (w)) 1341 if (WINDOW_WANTS_MODELINE_P (w))
1352 current_mode_line_height 1342 w->mode_line_height
1353 = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w), 1343 = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w),
1354 BVAR (current_buffer, mode_line_format)); 1344 BVAR (current_buffer, mode_line_format));
1355 1345
1356 if (WINDOW_WANTS_HEADER_LINE_P (w)) 1346 if (WINDOW_WANTS_HEADER_LINE_P (w))
1357 current_header_line_height 1347 w->header_line_height
1358 = display_mode_line (w, HEADER_LINE_FACE_ID, 1348 = display_mode_line (w, HEADER_LINE_FACE_ID,
1359 BVAR (current_buffer, header_line_format)); 1349 BVAR (current_buffer, header_line_format));
1360 1350
@@ -1647,8 +1637,6 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
1647 if (old_buffer) 1637 if (old_buffer)
1648 set_buffer_internal_1 (old_buffer); 1638 set_buffer_internal_1 (old_buffer);
1649 1639
1650 current_header_line_height = current_mode_line_height = -1;
1651
1652 if (visible_p && w->hscroll > 0) 1640 if (visible_p && w->hscroll > 0)
1653 *x -= 1641 *x -=
1654 window_hscroll_limited (w, WINDOW_XFRAME (w)) 1642 window_hscroll_limited (w, WINDOW_XFRAME (w))
@@ -6678,17 +6666,59 @@ lookup_glyphless_char_display (int c, struct it *it)
6678 return glyphless_method; 6666 return glyphless_method;
6679} 6667}
6680 6668
6681/* Load IT's display element fields with information about the next 6669/* Merge escape glyph face and cache the result. */
6682 display element from the current position of IT. Value is zero if
6683 end of buffer (or C string) is reached. */
6684 6670
6685static struct frame *last_escape_glyph_frame = NULL; 6671static struct frame *last_escape_glyph_frame = NULL;
6686static int last_escape_glyph_face_id = (1 << FACE_ID_BITS); 6672static int last_escape_glyph_face_id = (1 << FACE_ID_BITS);
6687static int last_escape_glyph_merged_face_id = 0; 6673static int last_escape_glyph_merged_face_id = 0;
6688 6674
6689struct frame *last_glyphless_glyph_frame = NULL; 6675static int
6690int last_glyphless_glyph_face_id = (1 << FACE_ID_BITS); 6676merge_escape_glyph_face (struct it *it)
6691int last_glyphless_glyph_merged_face_id = 0; 6677{
6678 int face_id;
6679
6680 if (it->f == last_escape_glyph_frame
6681 && it->face_id == last_escape_glyph_face_id)
6682 face_id = last_escape_glyph_merged_face_id;
6683 else
6684 {
6685 /* Merge the `escape-glyph' face into the current face. */
6686 face_id = merge_faces (it->f, Qescape_glyph, 0, it->face_id);
6687 last_escape_glyph_frame = it->f;
6688 last_escape_glyph_face_id = it->face_id;
6689 last_escape_glyph_merged_face_id = face_id;
6690 }
6691 return face_id;
6692}
6693
6694/* Likewise for glyphless glyph face. */
6695
6696static struct frame *last_glyphless_glyph_frame = NULL;
6697static int last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
6698static int last_glyphless_glyph_merged_face_id = 0;
6699
6700int
6701merge_glyphless_glyph_face (struct it *it)
6702{
6703 int face_id;
6704
6705 if (it->f == last_glyphless_glyph_frame
6706 && it->face_id == last_glyphless_glyph_face_id)
6707 face_id = last_glyphless_glyph_merged_face_id;
6708 else
6709 {
6710 /* Merge the `glyphless-char' face into the current face. */
6711 face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
6712 last_glyphless_glyph_frame = it->f;
6713 last_glyphless_glyph_face_id = it->face_id;
6714 last_glyphless_glyph_merged_face_id = face_id;
6715 }
6716 return face_id;
6717}
6718
6719/* Load IT's display element fields with information about the next
6720 display element from the current position of IT. Value is zero if
6721 end of buffer (or C string) is reached. */
6692 6722
6693static int 6723static int
6694get_next_display_element (struct it *it) 6724get_next_display_element (struct it *it)
@@ -6836,24 +6866,10 @@ get_next_display_element (struct it *it)
6836 g = GLYPH_CODE_CHAR (gc); 6866 g = GLYPH_CODE_CHAR (gc);
6837 lface_id = GLYPH_CODE_FACE (gc); 6867 lface_id = GLYPH_CODE_FACE (gc);
6838 } 6868 }
6839 if (lface_id) 6869
6840 { 6870 face_id = (lface_id
6841 face_id = merge_faces (it->f, Qt, lface_id, it->face_id); 6871 ? merge_faces (it->f, Qt, lface_id, it->face_id)
6842 } 6872 : merge_escape_glyph_face (it));
6843 else if (it->f == last_escape_glyph_frame
6844 && it->face_id == last_escape_glyph_face_id)
6845 {
6846 face_id = last_escape_glyph_merged_face_id;
6847 }
6848 else
6849 {
6850 /* Merge the escape-glyph face into the current face. */
6851 face_id = merge_faces (it->f, Qescape_glyph, 0,
6852 it->face_id);
6853 last_escape_glyph_frame = it->f;
6854 last_escape_glyph_face_id = it->face_id;
6855 last_escape_glyph_merged_face_id = face_id;
6856 }
6857 6873
6858 XSETINT (it->ctl_chars[0], g); 6874 XSETINT (it->ctl_chars[0], g);
6859 XSETINT (it->ctl_chars[1], c ^ 0100); 6875 XSETINT (it->ctl_chars[1], c ^ 0100);
@@ -6885,27 +6901,10 @@ get_next_display_element (struct it *it)
6885 escape_glyph = GLYPH_CODE_CHAR (gc); 6901 escape_glyph = GLYPH_CODE_CHAR (gc);
6886 lface_id = GLYPH_CODE_FACE (gc); 6902 lface_id = GLYPH_CODE_FACE (gc);
6887 } 6903 }
6888 if (lface_id) 6904
6889 { 6905 face_id = (lface_id
6890 /* The display table specified a face. 6906 ? merge_faces (it->f, Qt, lface_id, it->face_id)
6891 Merge it into face_id and also into escape_glyph. */ 6907 : merge_escape_glyph_face (it));
6892 face_id = merge_faces (it->f, Qt, lface_id,
6893 it->face_id);
6894 }
6895 else if (it->f == last_escape_glyph_frame
6896 && it->face_id == last_escape_glyph_face_id)
6897 {
6898 face_id = last_escape_glyph_merged_face_id;
6899 }
6900 else
6901 {
6902 /* Merge the escape-glyph face into the current face. */
6903 face_id = merge_faces (it->f, Qescape_glyph, 0,
6904 it->face_id);
6905 last_escape_glyph_frame = it->f;
6906 last_escape_glyph_face_id = it->face_id;
6907 last_escape_glyph_merged_face_id = face_id;
6908 }
6909 6908
6910 /* Draw non-ASCII hyphen with just highlighting: */ 6909 /* Draw non-ASCII hyphen with just highlighting: */
6911 6910
@@ -11993,7 +11992,7 @@ redisplay_tool_bar (struct frame *f)
11993 if (WINDOW_TOTAL_LINES (w) != old_height) 11992 if (WINDOW_TOTAL_LINES (w) != old_height)
11994 { 11993 {
11995 clear_glyph_matrix (w->desired_matrix); 11994 clear_glyph_matrix (w->desired_matrix);
11996 fonts_changed_p = 1; 11995 f->fonts_changed = 1;
11997 return 1; 11996 return 1;
11998 } 11997 }
11999 } 11998 }
@@ -12094,7 +12093,7 @@ redisplay_tool_bar (struct frame *f)
12094 { 12093 {
12095 clear_glyph_matrix (w->desired_matrix); 12094 clear_glyph_matrix (w->desired_matrix);
12096 f->n_tool_bar_rows = nrows; 12095 f->n_tool_bar_rows = nrows;
12097 fonts_changed_p = 1; 12096 f->fonts_changed = 1;
12098 return 1; 12097 return 1;
12099 } 12098 }
12100 } 12099 }
@@ -12980,15 +12979,6 @@ redisplay_internal (void)
12980 last_glyphless_glyph_frame = NULL; 12979 last_glyphless_glyph_frame = NULL;
12981 last_glyphless_glyph_face_id = (1 << FACE_ID_BITS); 12980 last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
12982 12981
12983 /* If new fonts have been loaded that make a glyph matrix adjustment
12984 necessary, do it. */
12985 if (fonts_changed_p)
12986 {
12987 adjust_glyphs (NULL);
12988 ++windows_or_buffers_changed;
12989 fonts_changed_p = 0;
12990 }
12991
12992 /* If face_change_count is non-zero, init_iterator will free all 12982 /* If face_change_count is non-zero, init_iterator will free all
12993 realized faces, which includes the faces referenced from current 12983 realized faces, which includes the faces referenced from current
12994 matrices. So, we can't reuse current matrices in this case. */ 12984 matrices. So, we can't reuse current matrices in this case. */
@@ -13019,7 +13009,19 @@ redisplay_internal (void)
13019 struct frame *f = XFRAME (frame); 13009 struct frame *f = XFRAME (frame);
13020 13010
13021 if (FRAME_VISIBLE_P (f)) 13011 if (FRAME_VISIBLE_P (f))
13022 ++number_of_visible_frames; 13012 {
13013 ++number_of_visible_frames;
13014 /* Adjust matrices for visible frames only. */
13015 if (f->fonts_changed)
13016 {
13017 adjust_frame_glyphs (f);
13018 f->fonts_changed = 0;
13019 }
13020 /* If cursor type has been changed on the frame
13021 other than selected, consider all frames. */
13022 if (f != sf && f->cursor_type_changed)
13023 update_mode_lines++;
13024 }
13023 clear_desired_matrices (f); 13025 clear_desired_matrices (f);
13024 } 13026 }
13025 13027
@@ -13068,8 +13070,7 @@ redisplay_internal (void)
13068 } 13070 }
13069 13071
13070 consider_all_windows_p = (update_mode_lines 13072 consider_all_windows_p = (update_mode_lines
13071 || buffer_shared_and_changed () 13073 || buffer_shared_and_changed ());
13072 || cursor_type_changed);
13073 13074
13074 /* If specs for an arrow have changed, do thorough redisplay 13075 /* If specs for an arrow have changed, do thorough redisplay
13075 to ensure we remove any arrow that should no longer exist. */ 13076 to ensure we remove any arrow that should no longer exist. */
@@ -13103,9 +13104,7 @@ redisplay_internal (void)
13103 if (!display_last_displayed_message_p) 13104 if (!display_last_displayed_message_p)
13104 message_cleared_p = 0; 13105 message_cleared_p = 0;
13105 13106
13106 if (fonts_changed_p) 13107 if (window_height_changed_p)
13107 goto retry;
13108 else if (window_height_changed_p)
13109 { 13108 {
13110 consider_all_windows_p = 1; 13109 consider_all_windows_p = 1;
13111 ++update_mode_lines; 13110 ++update_mode_lines;
@@ -13162,6 +13161,7 @@ redisplay_internal (void)
13162 && !current_buffer->prevent_redisplay_optimizations_p 13161 && !current_buffer->prevent_redisplay_optimizations_p
13163 && FRAME_VISIBLE_P (XFRAME (w->frame)) 13162 && FRAME_VISIBLE_P (XFRAME (w->frame))
13164 && !FRAME_OBSCURED_P (XFRAME (w->frame)) 13163 && !FRAME_OBSCURED_P (XFRAME (w->frame))
13164 && !XFRAME (w->frame)->cursor_type_changed
13165 /* Make sure recorded data applies to current buffer, etc. */ 13165 /* Make sure recorded data applies to current buffer, etc. */
13166 && this_line_buffer == current_buffer 13166 && this_line_buffer == current_buffer
13167 && match_p 13167 && match_p
@@ -13380,6 +13380,8 @@ redisplay_internal (void)
13380 && !EQ (FRAME_TTY (f)->top_frame, frame)) 13380 && !EQ (FRAME_TTY (f)->top_frame, frame))
13381 continue; 13381 continue;
13382 13382
13383 retry_frame:
13384
13383 if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf) 13385 if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf)
13384 { 13386 {
13385 /* Mark all the scroll bars to be removed; we'll redeem 13387 /* Mark all the scroll bars to be removed; we'll redeem
@@ -13399,20 +13401,22 @@ redisplay_internal (void)
13399 if (FRAME_TERMINAL (f)->judge_scroll_bars_hook) 13401 if (FRAME_TERMINAL (f)->judge_scroll_bars_hook)
13400 FRAME_TERMINAL (f)->judge_scroll_bars_hook (f); 13402 FRAME_TERMINAL (f)->judge_scroll_bars_hook (f);
13401 13403
13402 /* If fonts changed, display again. */
13403 /* ??? rms: I suspect it is a mistake to jump all the way
13404 back to retry here. It should just retry this frame. */
13405 if (fonts_changed_p)
13406 goto retry;
13407
13408 if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f)) 13404 if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
13409 { 13405 {
13406 /* If fonts changed on visible frame, display again. */
13407 if (f->fonts_changed)
13408 {
13409 adjust_frame_glyphs (f);
13410 f->fonts_changed = 0;
13411 goto retry_frame;
13412 }
13413
13410 /* See if we have to hscroll. */ 13414 /* See if we have to hscroll. */
13411 if (!f->already_hscrolled_p) 13415 if (!f->already_hscrolled_p)
13412 { 13416 {
13413 f->already_hscrolled_p = 1; 13417 f->already_hscrolled_p = 1;
13414 if (hscroll_windows (f->root_window)) 13418 if (hscroll_windows (f->root_window))
13415 goto retry; 13419 goto retry_frame;
13416 } 13420 }
13417 13421
13418 /* Prevent various kinds of signals during display 13422 /* Prevent various kinds of signals during display
@@ -13426,6 +13430,7 @@ redisplay_internal (void)
13426 /* Update the display. */ 13430 /* Update the display. */
13427 set_window_update_flags (XWINDOW (f->root_window), 1); 13431 set_window_update_flags (XWINDOW (f->root_window), 1);
13428 pending |= update_frame (f, 0, 0); 13432 pending |= update_frame (f, 0, 0);
13433 f->cursor_type_changed = 0;
13429 f->updated_p = 1; 13434 f->updated_p = 1;
13430 } 13435 }
13431 } 13436 }
@@ -13470,7 +13475,7 @@ redisplay_internal (void)
13470 13475
13471 update: 13476 update:
13472 /* If fonts changed, display again. */ 13477 /* If fonts changed, display again. */
13473 if (fonts_changed_p) 13478 if (sf->fonts_changed)
13474 goto retry; 13479 goto retry;
13475 13480
13476 /* Prevent various kinds of signals during display update. 13481 /* Prevent various kinds of signals during display update.
@@ -13487,6 +13492,7 @@ redisplay_internal (void)
13487 13492
13488 XWINDOW (selected_window)->must_be_updated_p = 1; 13493 XWINDOW (selected_window)->must_be_updated_p = 1;
13489 pending = update_frame (sf, 0, 0); 13494 pending = update_frame (sf, 0, 0);
13495 sf->cursor_type_changed = 0;
13490 } 13496 }
13491 13497
13492 /* We may have called echo_area_display at the top of this 13498 /* We may have called echo_area_display at the top of this
@@ -13501,6 +13507,7 @@ redisplay_internal (void)
13501 { 13507 {
13502 XWINDOW (mini_window)->must_be_updated_p = 1; 13508 XWINDOW (mini_window)->must_be_updated_p = 1;
13503 pending |= update_frame (mini_frame, 0, 0); 13509 pending |= update_frame (mini_frame, 0, 0);
13510 mini_frame->cursor_type_changed = 0;
13504 if (!pending && hscroll_windows (mini_window)) 13511 if (!pending && hscroll_windows (mini_window))
13505 goto retry; 13512 goto retry;
13506 } 13513 }
@@ -13541,7 +13548,6 @@ redisplay_internal (void)
13541 13548
13542 update_mode_lines = 0; 13549 update_mode_lines = 0;
13543 windows_or_buffers_changed = 0; 13550 windows_or_buffers_changed = 0;
13544 cursor_type_changed = 0;
13545 } 13551 }
13546 13552
13547 /* Start SIGIO interrupts coming again. Having them off during the 13553 /* Start SIGIO interrupts coming again. Having them off during the
@@ -14983,7 +14989,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
14983 cases. */ 14989 cases. */
14984 && !update_mode_lines 14990 && !update_mode_lines
14985 && !windows_or_buffers_changed 14991 && !windows_or_buffers_changed
14986 && !cursor_type_changed 14992 && !f->cursor_type_changed
14987 /* Can't use this case if highlighting a region. When a 14993 /* Can't use this case if highlighting a region. When a
14988 region exists, cursor movement has to do more than just 14994 region exists, cursor movement has to do more than just
14989 set the cursor. */ 14995 set the cursor. */
@@ -15330,9 +15336,8 @@ set_vertical_scroll_bar (struct window *w)
15330/* Redisplay leaf window WINDOW. JUST_THIS_ONE_P non-zero means only 15336/* Redisplay leaf window WINDOW. JUST_THIS_ONE_P non-zero means only
15331 selected_window is redisplayed. 15337 selected_window is redisplayed.
15332 15338
15333 We can return without actually redisplaying the window if 15339 We can return without actually redisplaying the window if fonts has been
15334 fonts_changed_p. In that case, redisplay_internal will 15340 changed on window's frame. In that case, redisplay_internal will retry. */
15335 retry. */
15336 15341
15337static void 15342static void
15338redisplay_window (Lisp_Object window, int just_this_one_p) 15343redisplay_window (Lisp_Object window, int just_this_one_p)
@@ -15717,7 +15722,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
15717 debug_method_add (w, "try_window_id %d", tem); 15722 debug_method_add (w, "try_window_id %d", tem);
15718#endif 15723#endif
15719 15724
15720 if (fonts_changed_p) 15725 if (f->fonts_changed)
15721 goto need_larger_matrices; 15726 goto need_larger_matrices;
15722 if (tem > 0) 15727 if (tem > 0)
15723 goto done; 15728 goto done;
@@ -15787,12 +15792,12 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
15787 IF_DEBUG (debug_method_add (w, "1")); 15792 IF_DEBUG (debug_method_add (w, "1"));
15788 if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0) 15793 if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0)
15789 /* -1 means we need to scroll. 15794 /* -1 means we need to scroll.
15790 0 means we need new matrices, but fonts_changed_p 15795 0 means we need new matrices, but fonts_changed
15791 is set in that case, so we will detect it below. */ 15796 is set in that case, so we will detect it below. */
15792 goto try_to_scroll; 15797 goto try_to_scroll;
15793 } 15798 }
15794 15799
15795 if (fonts_changed_p) 15800 if (f->fonts_changed)
15796 goto need_larger_matrices; 15801 goto need_larger_matrices;
15797 15802
15798 if (w->cursor.vpos >= 0) 15803 if (w->cursor.vpos >= 0)
@@ -15980,7 +15985,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
15980 /* Redisplay the window. */ 15985 /* Redisplay the window. */
15981 if (!current_matrix_up_to_date_p 15986 if (!current_matrix_up_to_date_p
15982 || windows_or_buffers_changed 15987 || windows_or_buffers_changed
15983 || cursor_type_changed 15988 || f->cursor_type_changed
15984 /* Don't use try_window_reusing_current_matrix in this case 15989 /* Don't use try_window_reusing_current_matrix in this case
15985 because it can have changed the buffer. */ 15990 because it can have changed the buffer. */
15986 || !NILP (Vwindow_scroll_functions) 15991 || !NILP (Vwindow_scroll_functions)
@@ -15993,7 +15998,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
15993 /* If new fonts have been loaded (due to fontsets), give up. We 15998 /* If new fonts have been loaded (due to fontsets), give up. We
15994 have to start a new redisplay since we need to re-adjust glyph 15999 have to start a new redisplay since we need to re-adjust glyph
15995 matrices. */ 16000 matrices. */
15996 if (fonts_changed_p) 16001 if (f->fonts_changed)
15997 goto need_larger_matrices; 16002 goto need_larger_matrices;
15998 16003
15999 /* If cursor did not appear assume that the middle of the window is 16004 /* If cursor did not appear assume that the middle of the window is
@@ -16106,7 +16111,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
16106 if (WINDOW_WANTS_MODELINE_P (w) 16111 if (WINDOW_WANTS_MODELINE_P (w)
16107 && CURRENT_MODE_LINE_HEIGHT (w) != DESIRED_MODE_LINE_HEIGHT (w)) 16112 && CURRENT_MODE_LINE_HEIGHT (w) != DESIRED_MODE_LINE_HEIGHT (w))
16108 { 16113 {
16109 fonts_changed_p = 1; 16114 f->fonts_changed = 1;
16115 w->mode_line_height = -1;
16110 MATRIX_MODE_LINE_ROW (w->current_matrix)->height 16116 MATRIX_MODE_LINE_ROW (w->current_matrix)->height
16111 = DESIRED_MODE_LINE_HEIGHT (w); 16117 = DESIRED_MODE_LINE_HEIGHT (w);
16112 } 16118 }
@@ -16116,12 +16122,13 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
16116 if (WINDOW_WANTS_HEADER_LINE_P (w) 16122 if (WINDOW_WANTS_HEADER_LINE_P (w)
16117 && CURRENT_HEADER_LINE_HEIGHT (w) != DESIRED_HEADER_LINE_HEIGHT (w)) 16123 && CURRENT_HEADER_LINE_HEIGHT (w) != DESIRED_HEADER_LINE_HEIGHT (w))
16118 { 16124 {
16119 fonts_changed_p = 1; 16125 f->fonts_changed = 1;
16126 w->header_line_height = -1;
16120 MATRIX_HEADER_LINE_ROW (w->current_matrix)->height 16127 MATRIX_HEADER_LINE_ROW (w->current_matrix)->height
16121 = DESIRED_HEADER_LINE_HEIGHT (w); 16128 = DESIRED_HEADER_LINE_HEIGHT (w);
16122 } 16129 }
16123 16130
16124 if (fonts_changed_p) 16131 if (f->fonts_changed)
16125 goto need_larger_matrices; 16132 goto need_larger_matrices;
16126 } 16133 }
16127 16134
@@ -16186,8 +16193,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
16186 } 16193 }
16187#endif /* HAVE_WINDOW_SYSTEM */ 16194#endif /* HAVE_WINDOW_SYSTEM */
16188 16195
16189 /* We go to this label, with fonts_changed_p set, 16196 /* We go to this label, with fonts_changed set, if it is
16190 if it is necessary to try again using larger glyph matrices. 16197 necessary to try again using larger glyph matrices.
16191 We have to redeem the scroll bar even in this case, 16198 We have to redeem the scroll bar even in this case,
16192 because the loop in redisplay_internal expects that. */ 16199 because the loop in redisplay_internal expects that. */
16193 need_larger_matrices: 16200 need_larger_matrices:
@@ -16259,7 +16266,7 @@ try_window (Lisp_Object window, struct text_pos pos, int flags)
16259 { 16266 {
16260 if (display_line (&it)) 16267 if (display_line (&it))
16261 last_text_row = it.glyph_row - 1; 16268 last_text_row = it.glyph_row - 1;
16262 if (fonts_changed_p && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE)) 16269 if (f->fonts_changed && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE))
16263 return 0; 16270 return 0;
16264 } 16271 }
16265 16272
@@ -16357,7 +16364,7 @@ try_window_reusing_current_matrix (struct window *w)
16357 /* Don't try to reuse the display if windows have been split 16364 /* Don't try to reuse the display if windows have been split
16358 or such. */ 16365 or such. */
16359 || windows_or_buffers_changed 16366 || windows_or_buffers_changed
16360 || cursor_type_changed) 16367 || f->cursor_type_changed)
16361 return 0; 16368 return 0;
16362 16369
16363 /* Can't do this if region may have changed. */ 16370 /* Can't do this if region may have changed. */
@@ -16405,8 +16412,7 @@ try_window_reusing_current_matrix (struct window *w)
16405 w->cursor.vpos = -1; 16412 w->cursor.vpos = -1;
16406 last_text_row = last_reused_text_row = NULL; 16413 last_text_row = last_reused_text_row = NULL;
16407 16414
16408 while (it.current_y < it.last_visible_y 16415 while (it.current_y < it.last_visible_y && !f->fonts_changed)
16409 && !fonts_changed_p)
16410 { 16416 {
16411 /* If we have reached into the characters in the START row, 16417 /* If we have reached into the characters in the START row,
16412 that means the line boundaries have changed. So we 16418 that means the line boundaries have changed. So we
@@ -16617,7 +16623,7 @@ try_window_reusing_current_matrix (struct window *w)
16617 if (pt_row == NULL) 16623 if (pt_row == NULL)
16618 w->cursor.vpos = -1; 16624 w->cursor.vpos = -1;
16619 last_text_row = NULL; 16625 last_text_row = NULL;
16620 while (it.current_y < it.last_visible_y && !fonts_changed_p) 16626 while (it.current_y < it.last_visible_y && !f->fonts_changed)
16621 if (display_line (&it)) 16627 if (display_line (&it))
16622 last_text_row = it.glyph_row - 1; 16628 last_text_row = it.glyph_row - 1;
16623 16629
@@ -17129,7 +17135,7 @@ try_window_id (struct window *w)
17129 GIVE_UP (1); 17135 GIVE_UP (1);
17130 17136
17131 /* This flag is used to prevent redisplay optimizations. */ 17137 /* This flag is used to prevent redisplay optimizations. */
17132 if (windows_or_buffers_changed || cursor_type_changed) 17138 if (windows_or_buffers_changed || f->cursor_type_changed)
17133 GIVE_UP (2); 17139 GIVE_UP (2);
17134 17140
17135 /* Verify that narrowing has not changed. 17141 /* Verify that narrowing has not changed.
@@ -17460,7 +17466,7 @@ try_window_id (struct window *w)
17460 last_text_row = NULL; 17466 last_text_row = NULL;
17461 overlay_arrow_seen = 0; 17467 overlay_arrow_seen = 0;
17462 while (it.current_y < it.last_visible_y 17468 while (it.current_y < it.last_visible_y
17463 && !fonts_changed_p 17469 && !f->fonts_changed
17464 && (first_unchanged_at_end_row == NULL 17470 && (first_unchanged_at_end_row == NULL
17465 || IT_CHARPOS (it) < stop_pos)) 17471 || IT_CHARPOS (it) < stop_pos))
17466 { 17472 {
@@ -17468,7 +17474,7 @@ try_window_id (struct window *w)
17468 last_text_row = it.glyph_row - 1; 17474 last_text_row = it.glyph_row - 1;
17469 } 17475 }
17470 17476
17471 if (fonts_changed_p) 17477 if (f->fonts_changed)
17472 return -1; 17478 return -1;
17473 17479
17474 17480
@@ -17715,8 +17721,7 @@ try_window_id (struct window *w)
17715 17721
17716 /* Display the rest of the lines at the window end. */ 17722 /* Display the rest of the lines at the window end. */
17717 it.glyph_row = MATRIX_ROW (desired_matrix, it.vpos); 17723 it.glyph_row = MATRIX_ROW (desired_matrix, it.vpos);
17718 while (it.current_y < it.last_visible_y 17724 while (it.current_y < it.last_visible_y && !f->fonts_changed)
17719 && !fonts_changed_p)
17720 { 17725 {
17721 /* Is it always sure that the display agrees with lines in 17726 /* Is it always sure that the display agrees with lines in
17722 the current matrix? I don't think so, so we mark rows 17727 the current matrix? I don't think so, so we mark rows
@@ -19252,7 +19257,7 @@ display_line (struct it *it)
19252 >= it->w->desired_matrix->nrows) 19257 >= it->w->desired_matrix->nrows)
19253 { 19258 {
19254 it->w->nrows_scale_factor++; 19259 it->w->nrows_scale_factor++;
19255 fonts_changed_p = 1; 19260 it->f->fonts_changed = 1;
19256 return 0; 19261 return 0;
19257 } 19262 }
19258 19263
@@ -23980,12 +23985,12 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
23980 23985
23981#define IT_EXPAND_MATRIX_WIDTH(it, area) \ 23986#define IT_EXPAND_MATRIX_WIDTH(it, area) \
23982 { \ 23987 { \
23983 if (!fonts_changed_p \ 23988 if (!it->f->fonts_changed \
23984 && (it->glyph_row->glyphs[area] \ 23989 && (it->glyph_row->glyphs[area] \
23985 < it->glyph_row->glyphs[area + 1])) \ 23990 < it->glyph_row->glyphs[area + 1])) \
23986 { \ 23991 { \
23987 it->w->ncols_scale_factor++; \ 23992 it->w->ncols_scale_factor++; \
23988 fonts_changed_p = 1; \ 23993 it->f->fonts_changed = 1; \
23989 } \ 23994 } \
23990 } 23995 }
23991 23996
@@ -24901,21 +24906,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
24901 base_height = it->ascent + it->descent; 24906 base_height = it->ascent + it->descent;
24902 base_width = font->average_width; 24907 base_width = font->average_width;
24903 24908
24904 /* Get a face ID for the glyph by utilizing a cache (the same way as 24909 face_id = merge_glyphless_glyph_face (it);
24905 done for `escape-glyph' in get_next_display_element). */
24906 if (it->f == last_glyphless_glyph_frame
24907 && it->face_id == last_glyphless_glyph_face_id)
24908 {
24909 face_id = last_glyphless_glyph_merged_face_id;
24910 }
24911 else
24912 {
24913 /* Merge the `glyphless-char' face into the current face. */
24914 face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
24915 last_glyphless_glyph_frame = it->f;
24916 last_glyphless_glyph_face_id = it->face_id;
24917 last_glyphless_glyph_merged_face_id = face_id;
24918 }
24919 24910
24920 if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE) 24911 if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE)
24921 { 24912 {
@@ -25956,7 +25947,7 @@ set_frame_cursor_types (struct frame *f, Lisp_Object arg)
25956 FRAME_BLINK_OFF_CURSOR (f) = DEFAULT_CURSOR; 25947 FRAME_BLINK_OFF_CURSOR (f) = DEFAULT_CURSOR;
25957 25948
25958 /* Make sure the cursor gets redrawn. */ 25949 /* Make sure the cursor gets redrawn. */
25959 cursor_type_changed = 1; 25950 f->cursor_type_changed = 1;
25960} 25951}
25961 25952
25962 25953
@@ -29686,8 +29677,6 @@ Its value should be an ASCII acronym string, `hex-code', `empty-box', or
29686void 29677void
29687init_xdisp (void) 29678init_xdisp (void)
29688{ 29679{
29689 current_header_line_height = current_mode_line_height = -1;
29690
29691 CHARPOS (this_line_start_pos) = 0; 29680 CHARPOS (this_line_start_pos) = 0;
29692 29681
29693 if (!noninteractive) 29682 if (!noninteractive)
diff --git a/src/xfns.c b/src/xfns.c
index b08fc76524c..4e8442dd3a3 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1201,7 +1201,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1201 clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix); 1201 clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix);
1202 } 1202 }
1203#endif /* not USE_X_TOOLKIT && not USE_GTK */ 1203#endif /* not USE_X_TOOLKIT && not USE_GTK */
1204 adjust_glyphs (f); 1204 adjust_frame_glyphs (f);
1205 run_window_configuration_change_hook (f); 1205 run_window_configuration_change_hook (f);
1206} 1206}
1207 1207
@@ -1264,7 +1264,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1264 1264
1265 FRAME_TOOL_BAR_LINES (f) = nlines; 1265 FRAME_TOOL_BAR_LINES (f) = nlines;
1266 resize_frame_windows (f, FRAME_LINES (f), 0); 1266 resize_frame_windows (f, FRAME_LINES (f), 0);
1267 adjust_glyphs (f); 1267 adjust_frame_glyphs (f);
1268 1268
1269 /* We also have to make sure that the internal border at the top of 1269 /* We also have to make sure that the internal border at the top of
1270 the frame, below the menu bar or tool bar, is redrawn when the 1270 the frame, below the menu bar or tool bar, is redrawn when the
@@ -5486,7 +5486,7 @@ Text larger than the specified size is clipped. */)
5486 } 5486 }
5487 5487
5488 FRAME_TOTAL_COLS (f) = w->total_cols; 5488 FRAME_TOTAL_COLS (f) = w->total_cols;
5489 adjust_glyphs (f); 5489 adjust_frame_glyphs (f);
5490 w->pseudo_window_p = 1; 5490 w->pseudo_window_p = 1;
5491 5491
5492 /* Display the tooltip text in a temporary buffer. */ 5492 /* Display the tooltip text in a temporary buffer. */
@@ -5554,7 +5554,7 @@ Text larger than the specified size is clipped. */)
5554 width /= WINDOW_FRAME_COLUMN_WIDTH (w); 5554 width /= WINDOW_FRAME_COLUMN_WIDTH (w);
5555 w->total_cols = width; 5555 w->total_cols = width;
5556 FRAME_TOTAL_COLS (f) = width; 5556 FRAME_TOTAL_COLS (f) = width;
5557 adjust_glyphs (f); 5557 adjust_frame_glyphs (f);
5558 clear_glyph_matrix (w->desired_matrix); 5558 clear_glyph_matrix (w->desired_matrix);
5559 clear_glyph_matrix (w->current_matrix); 5559 clear_glyph_matrix (w->current_matrix);
5560 try_window (FRAME_ROOT_WINDOW (f), pos, 0); 5560 try_window (FRAME_ROOT_WINDOW (f), pos, 0);