From 33565969fc0a41b461449d9b83bc9eb0ca5ba674 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 13 Feb 2002 16:21:07 +0000 Subject: [PATCH] (Finternal_make_lisp_face, Finternal_copy_lisp_face) (update_face_from_frame_parameter): Increment face_change_count and windows_or_buffers_changed to force redisplay using changed faces. --- src/xfaces.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/xfaces.c b/src/xfaces.c index cf1df227c6..c1d736eeb2 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3687,6 +3687,14 @@ Value is a vector of face attributes. */) else lface = global_lface; + /* Changing a named face means that all realized faces depending on + that face are invalid. Since we cannot tell which realized faces + depend on the face, make sure they are all removed. This is done + by incrementing face_change_count. The next call to + init_iterator will then free realized faces. */ + ++face_change_count; + ++windows_or_buffers_changed; + xassert (LFACEP (lface)); check_lface (lface); return lface; @@ -3754,6 +3762,14 @@ Value is TO. */) bcopy (XVECTOR (lface)->contents, XVECTOR (copy)->contents, LFACE_VECTOR_SIZE * sizeof (Lisp_Object)); + /* Changing a named face means that all realized faces depending on + that face are invalid. Since we cannot tell which realized faces + depend on the face, make sure they are all removed. This is done + by incrementing face_change_count. The next call to + init_iterator will then free realized faces. */ + ++face_change_count; + ++windows_or_buffers_changed; + return to; } @@ -4264,6 +4280,14 @@ update_face_from_frame_parameter (f, param, new_value) if (NILP (f->face_alist)) return; + /* Changing a named face means that all realized faces depending on + that face are invalid. Since we cannot tell which realized faces + depend on the face, make sure they are all removed. This is done + by incrementing face_change_count. The next call to + init_iterator will then free realized faces. */ + ++face_change_count; + ++windows_or_buffers_changed; + if (EQ (param, Qforeground_color)) { lface = lface_from_face_name (f, Qdefault, 1); -- 2.20.1