vec = best_entity;
SAFE_FREE ();
- font_add_log ("sort-by", prefer, vec);
+ FONT_ADD_LOG ("sort-by", prefer, vec);
return vec;
}
}
val = (i > 0 ? Fvconcat (i, vec) : null_vector);
- font_add_log ("list", spec, val);
+ FONT_ADD_LOG ("list", spec, val);
return (val);
}
if (! NILP (entity))
break;
}
- font_add_log ("match", work, entity);
+ FONT_ADD_LOG ("match", work, entity);
return entity;
}
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,
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);
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
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)))
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);
#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) */