diff options
author | Eli Zaretskii <eliz@gnu.org> | 2016-07-02 12:39:47 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2016-07-02 12:39:47 +0300 |
commit | 55d38fc89f5aeb9a73c9a8e13914fbb8a9a6a1af (patch) | |
tree | 46a5bde90a8759582c0c3f7071b7a533056eaa75 /src/xterm.c | |
parent | a5ec5c073a182aa014d9d753f14751248ea5c9a7 (diff) | |
download | emacs-55d38fc89f5aeb9a73c9a8e13914fbb8a9a6a1af.tar.gz |
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'.
Diffstat (limited to 'src/xterm.c')
-rw-r--r-- | src/xterm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xterm.c b/src/xterm.c index 9fb19a16f60..76b92dfb839 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1062,7 +1062,7 @@ x_draw_vertical_window_border (struct window *w, int x, int y0, int y1) struct frame *f = XFRAME (WINDOW_FRAME (w)); struct face *face; - face = FACE_OPT_FROM_ID (f, VERTICAL_BORDER_FACE_ID); + face = FACE_FROM_ID_OR_NULL (f, VERTICAL_BORDER_FACE_ID); if (face) XSetForeground (FRAME_X_DISPLAY (f), f->output_data.x->normal_gc, face->foreground); @@ -1081,11 +1081,11 @@ static void x_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1) { struct frame *f = XFRAME (WINDOW_FRAME (w)); - struct face *face = FACE_OPT_FROM_ID (f, WINDOW_DIVIDER_FACE_ID); + struct face *face = FACE_FROM_ID_OR_NULL (f, WINDOW_DIVIDER_FACE_ID); struct face *face_first - = FACE_OPT_FROM_ID (f, WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID); + = FACE_FROM_ID_OR_NULL (f, WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID); struct face *face_last - = FACE_OPT_FROM_ID (f, WINDOW_DIVIDER_LAST_PIXEL_FACE_ID); + = FACE_FROM_ID_OR_NULL (f, WINDOW_DIVIDER_LAST_PIXEL_FACE_ID); unsigned long color = face ? face->foreground : FRAME_FOREGROUND_PIXEL (f); unsigned long color_first = (face_first ? face_first->foreground @@ -1507,7 +1507,7 @@ x_set_mouse_face_gc (struct glyph_string *s) /* What face has to be used last for the mouse face? */ face_id = MOUSE_HL_INFO (s->f)->mouse_face_face_id; - face = FACE_OPT_FROM_ID (s->f, face_id); + face = FACE_FROM_ID_OR_NULL (s->f, face_id); if (face == NULL) face = FACE_FROM_ID (s->f, MOUSE_FACE_ID); |