]> git.eshelyaron.com Git - emacs.git/commitdiff
(Vfont_log): Extern it.
authorKenichi Handa <handa@m17n.org>
Tue, 23 Jun 2009 05:53:28 +0000 (05:53 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 23 Jun 2009 05:53:28 +0000 (05:53 +0000)
(FONT_ADD_LOG, FONT_DEFERRED_LOG): New macros.

src/font.h

index c2607774c7202e78d3d7f63f83de94217a79c52b..5726ffd319ce62067d6670c8315a8e5bae1f7a53 100644 (file)
@@ -826,9 +826,22 @@ extern struct font_driver nsfont_driver;
 #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 */