changeset 103549:3ff935d94ca3

(Vfont_log): Extern it. (FONT_ADD_LOG, FONT_DEFERRED_LOG): New macros.
author Kenichi Handa <handa@m17n.org>
date Tue, 23 Jun 2009 05:53:28 +0000
parents 1a45bb782f72
children 3d99e906c346
files src/font.h
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.h	Tue Jun 23 05:52:59 2009 +0000
+++ b/src/font.h	Tue Jun 23 05:53:28 2009 +0000
@@ -826,9 +826,22 @@
 #define FONT_DEBUG
 #endif
 
+extern Lisp_Object Vfont_log;
 extern void font_add_log P_ ((char *, Lisp_Object, Lisp_Object));
 extern void font_deferred_log P_ ((char *, Lisp_Object, Lisp_Object));
 
+#define FONT_ADD_LOG(ACTION, ARG, RESULT)	\
+  do {						\
+    if (! EQ (Vfont_log, Qt))			\
+      font_add_log ((ACTION), (ARG), (RESULT));	\
+  } while (0)
+
+#define FONT_DEFERRED_LOG(ACTION, ARG, RESULT)		\
+  do {							\
+    if (! EQ (Vfont_log, Qt))				\
+      font_deferred_log ((ACTION), (ARG), (RESULT));	\
+  } while (0)
+
 #ifdef FONT_DEBUG
 #define font_assert(X)	do {if (!(X)) abort ();} while (0)
 #else  /* not FONT_DEBUG */