changeset 40278:6ee20fddfbc5

(Fface_attributes_as_vector): New function. (syms_of_xfaces): defsubr it.
author Richard M. Stallman <rms@gnu.org>
date Wed, 24 Oct 2001 22:57:22 +0000
parents 61a533745adf
children 1adbc1480e83
files src/xfaces.c
diffstat 1 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Wed Oct 24 22:57:07 2001 +0000
+++ b/src/xfaces.c	Wed Oct 24 22:57:22 2001 +0000
@@ -5466,6 +5466,21 @@
   return lookup_face (f, attrs, c, default_face);
 }
 
+DEFUN ("face-attributes-as-vector", Fface_attributes_as_vector,
+       Sface_attributes_as_vector, 1, 1, 0,
+       doc: /* Return a vector of face attributes corresponding to PLIST. */)
+     (plist)
+     Lisp_Object plist;
+{
+  Lisp_Object lface;
+  lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE),
+			Qunspecified);
+  merge_face_vector_with_property (XFRAME (selected_frame),
+				   XVECTOR (lface)->contents,
+				   plist);
+  return lface;
+}
+
 
 
 /***********************************************************************
@@ -6714,7 +6729,6 @@
   return face_id;
 }
 
-
 /* Return the face ID associated with buffer position POS for
    displaying ASCII characters.  Return in *ENDPTR the position at
    which a different face is needed, as far as text properties and
@@ -7202,6 +7216,7 @@
   defsubr (&Sinternal_set_font_selection_order);
   defsubr (&Sinternal_set_alternative_font_family_alist);
   defsubr (&Sinternal_set_alternative_font_registry_alist);
+  defsubr (&Sface_attributes_as_vector);
 #if GLYPH_DEBUG
   defsubr (&Sdump_face);
   defsubr (&Sshow_face_resources);