summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xfaces.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 1e0de77ea3b..590e9885622 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3009,7 +3009,7 @@ the WIDTH times as wide as FACE on FRAME. */)
{
/* This is of limited utility since it works with character
widths. Keep it for compatibility. --gerd. */
- int face_id = lookup_named_face (f, face, 0);
+ int face_id = lookup_named_face (f, face, 0, 0);
struct face *face = (face_id < 0
? NULL
: FACE_FROM_ID (f, face_id));
@@ -4923,7 +4923,7 @@ If FRAME is omitted or nil, use the selected frame. */)
else
{
struct frame *f = frame_or_selected_frame (frame, 1);
- int face_id = lookup_named_face (f, face, 0);
+ int face_id = lookup_named_face (f, face, 0, 1);
struct face *face = FACE_FROM_ID (f, face_id);
return face ? build_string (face->font_name) : Qnil;
}
@@ -5615,10 +5615,11 @@ lookup_face (f, attr, c, base_face)
isn't realized and cannot be realized. */
int
-lookup_named_face (f, symbol, c)
+lookup_named_face (f, symbol, c, signal_p)
struct frame *f;
Lisp_Object symbol;
int c;
+ int signal_p;
{
Lisp_Object attrs[LFACE_VECTOR_SIZE];
Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE];
@@ -5631,7 +5632,9 @@ lookup_named_face (f, symbol, c)
default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
}
- get_lface_attributes (f, symbol, symbol_attrs, 1);
+ if (!get_lface_attributes (f, symbol, symbol_attrs, signal_p))
+ return -1;
+
bcopy (default_face->lface, attrs, sizeof attrs);
merge_face_vectors (f, symbol_attrs, attrs, 0);
@@ -5652,7 +5655,7 @@ ascii_face_of_lisp_face (f, lface_id)
if (lface_id >= 0 && lface_id < lface_id_to_name_size)
{
Lisp_Object face_name = lface_id_to_name[lface_id];
- face_id = lookup_named_face (f, face_name, 0);
+ face_id = lookup_named_face (f, face_name, 0, 1);
}
else
face_id = -1;