diff options
| author | Kenichi Handa | 2009-06-23 05:52:59 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2009-06-23 05:52:59 +0000 |
| commit | 652b9560dc1029e537d8e3d53533c82efb2049e3 (patch) | |
| tree | 947fe254d3ec6d70368578f4356d678ec6790fd6 /src | |
| parent | 678dca3ddb168373ce2092be9c9824ad1cdff29c (diff) | |
| download | emacs-652b9560dc1029e537d8e3d53533c82efb2049e3.tar.gz emacs-652b9560dc1029e537d8e3d53533c82efb2049e3.zip | |
(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.
Diffstat (limited to 'src')
| -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) | |||
| 2372 | vec = best_entity; | 2372 | vec = best_entity; |
| 2373 | SAFE_FREE (); | 2373 | SAFE_FREE (); |
| 2374 | 2374 | ||
| 2375 | font_add_log ("sort-by", prefer, vec); | 2375 | FONT_ADD_LOG ("sort-by", prefer, vec); |
| 2376 | return vec; | 2376 | return vec; |
| 2377 | } | 2377 | } |
| 2378 | 2378 | ||
| @@ -2832,7 +2832,7 @@ font_list_entities (frame, spec) | |||
| 2832 | } | 2832 | } |
| 2833 | 2833 | ||
| 2834 | val = (i > 0 ? Fvconcat (i, vec) : null_vector); | 2834 | val = (i > 0 ? Fvconcat (i, vec) : null_vector); |
| 2835 | font_add_log ("list", spec, val); | 2835 | FONT_ADD_LOG ("list", spec, val); |
| 2836 | return (val); | 2836 | return (val); |
| 2837 | } | 2837 | } |
| 2838 | 2838 | ||
| @@ -2883,7 +2883,7 @@ font_matching_entity (f, attrs, spec) | |||
| 2883 | if (! NILP (entity)) | 2883 | if (! NILP (entity)) |
| 2884 | break; | 2884 | break; |
| 2885 | } | 2885 | } |
| 2886 | font_add_log ("match", work, entity); | 2886 | FONT_ADD_LOG ("match", work, entity); |
| 2887 | return entity; | 2887 | return entity; |
| 2888 | } | 2888 | } |
| 2889 | 2889 | ||
| @@ -2925,7 +2925,7 @@ font_open_entity (f, entity, pixel_size) | |||
| 2925 | 2925 | ||
| 2926 | font_object = driver_list->driver->open (f, entity, scaled_pixel_size); | 2926 | font_object = driver_list->driver->open (f, entity, scaled_pixel_size); |
| 2927 | ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size)); | 2927 | ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size)); |
| 2928 | font_add_log ("open", entity, font_object); | 2928 | FONT_ADD_LOG ("open", entity, font_object); |
| 2929 | if (NILP (font_object)) | 2929 | if (NILP (font_object)) |
| 2930 | return Qnil; | 2930 | return Qnil; |
| 2931 | ASET (entity, FONT_OBJLIST_INDEX, | 2931 | ASET (entity, FONT_OBJLIST_INDEX, |
| @@ -2972,7 +2972,7 @@ font_close_object (f, font_object) | |||
| 2972 | if (NILP (AREF (font_object, FONT_TYPE_INDEX))) | 2972 | if (NILP (AREF (font_object, FONT_TYPE_INDEX))) |
| 2973 | /* Already closed. */ | 2973 | /* Already closed. */ |
| 2974 | return; | 2974 | return; |
| 2975 | font_add_log ("close", font_object, Qnil); | 2975 | FONT_ADD_LOG ("close", font_object, Qnil); |
| 2976 | font->driver->close (f, font); | 2976 | font->driver->close (f, font); |
| 2977 | #ifdef HAVE_WINDOW_SYSTEM | 2977 | #ifdef HAVE_WINDOW_SYSTEM |
| 2978 | font_assert (FRAME_X_DISPLAY_INFO (f)->n_fonts); | 2978 | font_assert (FRAME_X_DISPLAY_INFO (f)->n_fonts); |
| @@ -5003,8 +5003,7 @@ build_style_table (entry, nelement) | |||
| 5003 | return table; | 5003 | return table; |
| 5004 | } | 5004 | } |
| 5005 | 5005 | ||
| 5006 | static Lisp_Object Vfont_log; | 5006 | Lisp_Object Vfont_log; |
| 5007 | static int font_log_env_checked; | ||
| 5008 | 5007 | ||
| 5009 | /* The deferred font-log data of the form [ACTION ARG RESULT]. | 5008 | /* The deferred font-log data of the form [ACTION ARG RESULT]. |
| 5010 | If ACTION is not nil, that is added to the log when font_add_log is | 5009 | 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) | |||
| 5023 | Lisp_Object tail, val; | 5022 | Lisp_Object tail, val; |
| 5024 | int i; | 5023 | int i; |
| 5025 | 5024 | ||
| 5026 | if (! font_log_env_checked) | ||
| 5027 | { | ||
| 5028 | Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt; | ||
| 5029 | font_log_env_checked = 1; | ||
| 5030 | } | ||
| 5031 | if (EQ (Vfont_log, Qt)) | 5025 | if (EQ (Vfont_log, Qt)) |
| 5032 | return; | 5026 | return; |
| 5033 | if (STRINGP (AREF (Vfont_log_deferred, 0))) | 5027 | if (STRINGP (AREF (Vfont_log_deferred, 0))) |
| @@ -5107,6 +5101,8 @@ font_deferred_log (action, arg, result) | |||
| 5107 | char *action; | 5101 | char *action; |
| 5108 | Lisp_Object arg, result; | 5102 | Lisp_Object arg, result; |
| 5109 | { | 5103 | { |
| 5104 | if (EQ (Vfont_log, Qt)) | ||
| 5105 | return; | ||
| 5110 | ASET (Vfont_log_deferred, 0, build_string (action)); | 5106 | ASET (Vfont_log_deferred, 0, build_string (action)); |
| 5111 | ASET (Vfont_log_deferred, 1, arg); | 5107 | ASET (Vfont_log_deferred, 1, arg); |
| 5112 | ASET (Vfont_log_deferred, 2, result); | 5108 | ASET (Vfont_log_deferred, 2, result); |
| @@ -5298,5 +5294,11 @@ EMACS_FONT_LOG is set. Otherwise, it is set to t. */); | |||
| 5298 | #endif /* HAVE_WINDOW_SYSTEM */ | 5294 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 5299 | } | 5295 | } |
| 5300 | 5296 | ||
| 5297 | void | ||
| 5298 | init_font () | ||
| 5299 | { | ||
| 5300 | Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt; | ||
| 5301 | } | ||
| 5302 | |||
| 5301 | /* arch-tag: 74c9475d-5976-4c93-a327-942ae3072846 | 5303 | /* arch-tag: 74c9475d-5976-4c93-a327-942ae3072846 |
| 5302 | (do not change this comment) */ | 5304 | (do not change this comment) */ |