aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2002-08-29 14:41:09 +0000
committerRichard M. Stallman2002-08-29 14:41:09 +0000
commit26683087ad6d9845356845ca6cb441cee5304670 (patch)
treea4bc7fb940eb686929254963dac13ae52bf63fe3 /src
parent95f2448c935b3a96671a44227b9782f65c5a319f (diff)
downloademacs-26683087ad6d9845356845ca6cb441cee5304670.tar.gz
emacs-26683087ad6d9845356845ca6cb441cee5304670.zip
(redisplay_updating_p): Variable removed.
(inhibit_free_realized_faces, Qinhibit_free_realized_faces): New variables. (init_iterator): Don't free realized faces if inhibit_free_realized_faces is set. (redisplay_internal): Bind Qinhibit_free_realized_faces to nil. (syms_of_xdisp): DEFVAR_BOOL inhibit-free-realized-faces, initialize Qinhibit_free_realized_faces.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 21fbdaca0d9..477fb623ad5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -706,9 +706,12 @@ static struct frame *previous_terminal_frame;
706 706
707int redisplaying_p; 707int redisplaying_p;
708 708
709/* Non-zero while redisplay is updating the display. */ 709/* Non-zero means don't free realized faces. Bound while freeing
710 realized faces is dangerous because glyph matrices might still
711 reference them. */
710 712
711int redisplay_updating_p; 713int inhibit_free_realized_faces;
714Lisp_Object Qinhibit_free_realized_faces;
712 715
713 716
714/* Function prototypes. */ 717/* Function prototypes. */
@@ -1524,7 +1527,7 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id)
1524 free realized faces now because they depend on face definitions 1527 free realized faces now because they depend on face definitions
1525 that might have changed. Don't free faces while there might be 1528 that might have changed. Don't free faces while there might be
1526 desired matrices pending which reference these faces. */ 1529 desired matrices pending which reference these faces. */
1527 if (face_change_count && !redisplay_updating_p) 1530 if (face_change_count && !inhibit_free_realized_faces)
1528 { 1531 {
1529 face_change_count = 0; 1532 face_change_count = 0;
1530 free_all_realized_faces (Qnil); 1533 free_all_realized_faces (Qnil);
@@ -8522,11 +8525,11 @@ redisplay_internal (preserve_echo_area)
8522 count = SPECPDL_INDEX (); 8525 count = SPECPDL_INDEX ();
8523 record_unwind_protect (unwind_redisplay, make_number (redisplaying_p)); 8526 record_unwind_protect (unwind_redisplay, make_number (redisplaying_p));
8524 ++redisplaying_p; 8527 ++redisplaying_p;
8528 specbind (Qinhibit_free_realized_faces, Qnil);
8525 8529
8526 retry: 8530 retry:
8527 pause = 0; 8531 pause = 0;
8528 reconsider_clip_changes (w, current_buffer); 8532 reconsider_clip_changes (w, current_buffer);
8529 redisplay_updating_p = 0;
8530 8533
8531 /* If new fonts have been loaded that make a glyph matrix adjustment 8534 /* If new fonts have been loaded that make a glyph matrix adjustment
8532 necessary, do it. */ 8535 necessary, do it. */
@@ -9014,9 +9017,8 @@ redisplay_internal (preserve_echo_area)
9014 redisplay_window_error); 9017 redisplay_window_error);
9015 9018
9016 /* Compare desired and current matrices, perform output. */ 9019 /* Compare desired and current matrices, perform output. */
9017 update:
9018 redisplay_updating_p = 1;
9019 9020
9021 update:
9020 /* If fonts changed, display again. */ 9022 /* If fonts changed, display again. */
9021 if (fonts_changed_p) 9023 if (fonts_changed_p)
9022 goto retry; 9024 goto retry;
@@ -9142,7 +9144,6 @@ redisplay_internal (preserve_echo_area)
9142 goto retry; 9144 goto retry;
9143 9145
9144 end_of_redisplay: 9146 end_of_redisplay:
9145 redisplay_updating_p = 0;
9146 unbind_to (count, Qnil); 9147 unbind_to (count, Qnil);
9147} 9148}
9148 9149
@@ -9180,14 +9181,13 @@ redisplay_preserve_echo_area (from_where)
9180/* Function registered with record_unwind_protect in 9181/* Function registered with record_unwind_protect in
9181 redisplay_internal. Reset redisplaying_p to the value it had 9182 redisplay_internal. Reset redisplaying_p to the value it had
9182 before redisplay_internal was called, and clear 9183 before redisplay_internal was called, and clear
9183 redisplay_updating_p. */ 9184 prevent_freeing_realized_faces_p. */
9184 9185
9185static Lisp_Object 9186static Lisp_Object
9186unwind_redisplay (old_redisplaying_p) 9187unwind_redisplay (old_redisplaying_p)
9187 Lisp_Object old_redisplaying_p; 9188 Lisp_Object old_redisplaying_p;
9188{ 9189{
9189 redisplaying_p = XFASTINT (old_redisplaying_p); 9190 redisplaying_p = XFASTINT (old_redisplaying_p);
9190 redisplay_updating_p = 0;
9191 return Qnil; 9191 return Qnil;
9192} 9192}
9193 9193
@@ -15307,6 +15307,8 @@ syms_of_xdisp ()
15307 staticpro (&Qobject); 15307 staticpro (&Qobject);
15308 Qrisky_local_variable = intern ("risky-local-variable"); 15308 Qrisky_local_variable = intern ("risky-local-variable");
15309 staticpro (&Qrisky_local_variable); 15309 staticpro (&Qrisky_local_variable);
15310 Qinhibit_free_realized_faces = intern ("inhibit-free-realized-faces");
15311 staticpro (&Qinhibit_free_realized_faces);
15310 15312
15311 list_of_error = Fcons (intern ("error"), Qnil); 15313 list_of_error = Fcons (intern ("error"), Qnil);
15312 staticpro (&list_of_error); 15314 staticpro (&list_of_error);
@@ -15569,6 +15571,10 @@ Can be used to update submenus whose contents should vary. */);
15569 doc: /* Non-nil means don't eval Lisp during redisplay. */); 15571 doc: /* Non-nil means don't eval Lisp during redisplay. */);
15570 inhibit_eval_during_redisplay = 0; 15572 inhibit_eval_during_redisplay = 0;
15571 15573
15574 DEFVAR_BOOL ("inhibit-free-realized-faces", &inhibit_free_realized_faces,
15575 doc: /* Non-nil means don't free realized faces. Internal use only. */);
15576 inhibit_free_realized_faces = 0;
15577
15572#if GLYPH_DEBUG 15578#if GLYPH_DEBUG
15573 DEFVAR_BOOL ("inhibit-try-window-id", &inhibit_try_window_id, 15579 DEFVAR_BOOL ("inhibit-try-window-id", &inhibit_try_window_id,
15574 doc: /* Inhibit try_window_id display optimization. */); 15580 doc: /* Inhibit try_window_id display optimization. */);