diff options
| author | Richard M. Stallman | 2001-10-24 22:57:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-10-24 22:57:22 +0000 |
| commit | f6608d5cc84488f9a2717b71fa5d6dc0f7c442d5 (patch) | |
| tree | 40142518f334968aaa2badac88b7bed2d6db3a12 /src | |
| parent | d436d53865993c4cd03177c65104168ad0d81d4c (diff) | |
| download | emacs-f6608d5cc84488f9a2717b71fa5d6dc0f7c442d5.tar.gz emacs-f6608d5cc84488f9a2717b71fa5d6dc0f7c442d5.zip | |
(Fface_attributes_as_vector): New function.
(syms_of_xfaces): defsubr it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index cdf6c427d4b..a21e11d9cf2 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -5466,6 +5466,21 @@ lookup_derived_face (f, symbol, c, face_id) | |||
| 5466 | return lookup_face (f, attrs, c, default_face); | 5466 | return lookup_face (f, attrs, c, default_face); |
| 5467 | } | 5467 | } |
| 5468 | 5468 | ||
| 5469 | DEFUN ("face-attributes-as-vector", Fface_attributes_as_vector, | ||
| 5470 | Sface_attributes_as_vector, 1, 1, 0, | ||
| 5471 | doc: /* Return a vector of face attributes corresponding to PLIST. */) | ||
| 5472 | (plist) | ||
| 5473 | Lisp_Object plist; | ||
| 5474 | { | ||
| 5475 | Lisp_Object lface; | ||
| 5476 | lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE), | ||
| 5477 | Qunspecified); | ||
| 5478 | merge_face_vector_with_property (XFRAME (selected_frame), | ||
| 5479 | XVECTOR (lface)->contents, | ||
| 5480 | plist); | ||
| 5481 | return lface; | ||
| 5482 | } | ||
| 5483 | |||
| 5469 | 5484 | ||
| 5470 | 5485 | ||
| 5471 | /*********************************************************************** | 5486 | /*********************************************************************** |
| @@ -6714,7 +6729,6 @@ compute_char_face (f, ch, prop) | |||
| 6714 | return face_id; | 6729 | return face_id; |
| 6715 | } | 6730 | } |
| 6716 | 6731 | ||
| 6717 | |||
| 6718 | /* Return the face ID associated with buffer position POS for | 6732 | /* Return the face ID associated with buffer position POS for |
| 6719 | displaying ASCII characters. Return in *ENDPTR the position at | 6733 | displaying ASCII characters. Return in *ENDPTR the position at |
| 6720 | which a different face is needed, as far as text properties and | 6734 | which a different face is needed, as far as text properties and |
| @@ -7202,6 +7216,7 @@ syms_of_xfaces () | |||
| 7202 | defsubr (&Sinternal_set_font_selection_order); | 7216 | defsubr (&Sinternal_set_font_selection_order); |
| 7203 | defsubr (&Sinternal_set_alternative_font_family_alist); | 7217 | defsubr (&Sinternal_set_alternative_font_family_alist); |
| 7204 | defsubr (&Sinternal_set_alternative_font_registry_alist); | 7218 | defsubr (&Sinternal_set_alternative_font_registry_alist); |
| 7219 | defsubr (&Sface_attributes_as_vector); | ||
| 7205 | #if GLYPH_DEBUG | 7220 | #if GLYPH_DEBUG |
| 7206 | defsubr (&Sdump_face); | 7221 | defsubr (&Sdump_face); |
| 7207 | defsubr (&Sshow_face_resources); | 7222 | defsubr (&Sshow_face_resources); |