From 55d38fc89f5aeb9a73c9a8e13914fbb8a9a6a1af Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 2 Jul 2016 12:39:47 +0300 Subject: Rename FACE_OPT_FROM_ID to FACE_FROM_ID_OR_NULL * src/dispextern.h (FACE_FROM_ID_OR_NULL): Renamed from FACE_OPT_FROM_ID; all callers changed. * src/xdisp.c (extend_face_to_end_of_line): Call FACE_FROM_ID, not FACE_FROM_ID_OR_NULL, as the resulting face is immediately dereferenced. (fill_gstring_glyph_string): Call FACE_FROM_ID, not FACE_FROM_ID_OR_NULL, as the resulting face will be dereferenced when the glyph string is drawn. (BUILD_COMPOSITE_GLYPH_STRING): Call FACE_FROM_ID, not FACE_FROM_ID_OR_NULL, as the resulting face will be dereferenced in fill_composite_glyph_string. (calc_line_height_property): Call FACE_FROM_ID_OR_NULL rather that FACE_FROM_ID, since the function and its caller can cope with that situation. Conflate 3 tests of missing face or font into just one. * src/xfaces.c (Fx_list_fonts, Fface_font, lookup_face): Call FACE_FROM_ID_OR_NULL rather that FACE_FROM_ID, since these functions can cope with that situation. (lookup_derived_face): Don't call FACE_FROM_ID if the result will not be used. * src/w32console.c (w32_face_attributes): Remove redundant 'eassert'. --- src/fontset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fontset.c') diff --git a/src/fontset.c b/src/fontset.c index 81528de55a0..67696d0fead 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1305,7 +1305,7 @@ free_realized_fontsets (Lisp_Object base) { struct frame *f = XFRAME (FONTSET_FRAME (this)); int face_id = XINT (XCDR (XCAR (tail))); - struct face *face = FACE_OPT_FROM_ID (f, face_id); + struct face *face = FACE_FROM_ID_OR_NULL (f, face_id); /* Face THIS itself is also freed by the following call. */ free_realized_face (f, face); @@ -1637,7 +1637,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */) continue; if (fontset_id != FRAME_FONTSET (f)) continue; - face = FACE_OPT_FROM_ID (f, DEFAULT_FACE_ID); + face = FACE_FROM_ID_OR_NULL (f, DEFAULT_FACE_ID); if (face) font_object = font_load_for_lface (f, face->lface, font_spec); else -- cgit v1.2.1