changeset 31449:8797df6a9fa2

(Vparam_value_alist): New variable. (syms_of_xfaces): Initialize it. (Finternal_set_lisp_face_attribute): Avoid more consing.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 07 Sep 2000 11:37:48 +0000
parents 70b366918608
children 82556406aa45
files src/xfaces.c
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Thu Sep 07 11:37:29 2000 +0000
+++ b/src/xfaces.c	Thu Sep 07 11:37:48 2000 +0000
@@ -435,6 +435,11 @@
 
 int tty_suppress_bold_inverse_default_colors_p;
 
+/* A list of the form `((x . y))' used to avoid consing in
+   Finternal_set_lisp_face_attribute.  */
+
+static Lisp_Object Vparam_value_alist;
+
 /* The total number of colors currently allocated.  */
 
 #if GLYPH_DEBUG
@@ -4032,7 +4037,13 @@
 	}
 
       if (!NILP (param))
-	Fmodify_frame_parameters (frame, Fcons (Fcons (param, value), Qnil));
+	{
+	  Lisp_Object cons;
+	  cons = XCAR (Vparam_value_alist);
+	  XCAR (cons) = param;
+	  XCDR (cons) = value;
+	  Fmodify_frame_parameters (frame, Vparam_value_alist);
+	}
     }
 
 #endif /* HAVE_WINDOW_SYSTEM */
@@ -7009,6 +7020,8 @@
   Qtty_color_alist = intern ("tty-color-alist");
   staticpro (&Qtty_color_alist);
 
+  Vparam_value_alist = Fcons (Fcons (Qnil, Qnil), Qnil);
+  staticpro (&Vparam_value_alist);
   Vface_alternative_font_family_alist = Qnil;
   staticpro (&Vface_alternative_font_family_alist);