diff options
author | Kenichi Handa <handa@m17n.org> | 2009-06-23 05:52:59 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2009-06-23 05:52:59 +0000 |
commit | 652b9560dc1029e537d8e3d53533c82efb2049e3 (patch) | |
tree | 947fe254d3ec6d70368578f4356d678ec6790fd6 | |
parent | 678dca3ddb168373ce2092be9c9824ad1cdff29c (diff) | |
download | emacs-652b9560dc1029e537d8e3d53533c82efb2049e3.tar.gz |
(font_sort_entities, font_list_entities)
(font_matching_entity, font_open_entity)
(font_close_object): Change font_add_log to FONT_ADD_LOG.
(Vfont_log): Delete static.
(font_log_env_checked): Delete this variable.
(font_add_log): Don't check font_log_env_checked.
(font_deferred_log): Check Vfont_log.
(init_font): New function.
-rw-r--r-- | src/font.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/font.c b/src/font.c index bc21fce3859..203acc7b542 100644 --- a/src/font.c +++ b/src/font.c @@ -2372,7 +2372,7 @@ font_sort_entities (vec, prefer, frame, best_only) vec = best_entity; SAFE_FREE (); - font_add_log ("sort-by", prefer, vec); + FONT_ADD_LOG ("sort-by", prefer, vec); return vec; } @@ -2832,7 +2832,7 @@ font_list_entities (frame, spec) } val = (i > 0 ? Fvconcat (i, vec) : null_vector); - font_add_log ("list", spec, val); + FONT_ADD_LOG ("list", spec, val); return (val); } @@ -2883,7 +2883,7 @@ font_matching_entity (f, attrs, spec) if (! NILP (entity)) break; } - font_add_log ("match", work, entity); + FONT_ADD_LOG ("match", work, entity); return entity; } @@ -2925,7 +2925,7 @@ font_open_entity (f, entity, pixel_size) font_object = driver_list->driver->open (f, entity, scaled_pixel_size); ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size)); - font_add_log ("open", entity, font_object); + FONT_ADD_LOG ("open", entity, font_object); if (NILP (font_object)) return Qnil; ASET (entity, FONT_OBJLIST_INDEX, @@ -2972,7 +2972,7 @@ font_close_object (f, font_object) if (NILP (AREF (font_object, FONT_TYPE_INDEX))) /* Already closed. */ return; - font_add_log ("close", font_object, Qnil); + FONT_ADD_LOG ("close", font_object, Qnil); font->driver->close (f, font); #ifdef HAVE_WINDOW_SYSTEM font_assert (FRAME_X_DISPLAY_INFO (f)->n_fonts); @@ -5003,8 +5003,7 @@ build_style_table (entry, nelement) return table; } -static Lisp_Object Vfont_log; -static int font_log_env_checked; +Lisp_Object Vfont_log; /* The deferred font-log data of the form [ACTION ARG RESULT]. If ACTION is not nil, that is added to the log when font_add_log is @@ -5023,11 +5022,6 @@ font_add_log (action, arg, result) Lisp_Object tail, val; int i; - if (! font_log_env_checked) - { - Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt; - font_log_env_checked = 1; - } if (EQ (Vfont_log, Qt)) return; if (STRINGP (AREF (Vfont_log_deferred, 0))) @@ -5107,6 +5101,8 @@ font_deferred_log (action, arg, result) char *action; Lisp_Object arg, result; { + if (EQ (Vfont_log, Qt)) + return; ASET (Vfont_log_deferred, 0, build_string (action)); ASET (Vfont_log_deferred, 1, arg); ASET (Vfont_log_deferred, 2, result); @@ -5298,5 +5294,11 @@ EMACS_FONT_LOG is set. Otherwise, it is set to t. */); #endif /* HAVE_WINDOW_SYSTEM */ } +void +init_font () +{ + Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt; +} + /* arch-tag: 74c9475d-5976-4c93-a327-942ae3072846 (do not change this comment) */ |