Update copyright notices for 2013.
[bpt/emacs.git] / src / fontset.c
index 2b955fe..c6148e9 100644 (file)
@@ -1,6 +1,6 @@
 /* Fontset handler.
 
-Copyright (C) 2001-201 Free Software Foundation, Inc.
+Copyright (C) 2001-2013 Free Software Foundation, Inc.
 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
   2005, 2006, 2007, 2008, 2009, 2010, 2011
   National Institute of Advanced Industrial Science and Technology (AIST)
@@ -26,7 +26,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "blockinput.h"
@@ -43,7 +42,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef HAVE_X_WINDOWS
 #include "xterm.h"
 #endif
-#ifdef WINDOWSNT
+#ifdef HAVE_NTGUI
 #include "w32term.h"
 #endif
 #ifdef HAVE_NS
@@ -1276,7 +1275,7 @@ free_realized_fontsets (Lisp_Object base)
      doesn't remove FACE from a cache.  Until we find a solution, we
      suppress this code, and simply use Fclear_face_cache even though
      that is not efficient.  */
-  BLOCK_INPUT;
+  block_input ();
   for (id = 0; id < ASIZE (Vfontset_table); id++)
     {
       Lisp_Object this = AREF (Vfontset_table, id);
@@ -1297,7 +1296,7 @@ free_realized_fontsets (Lisp_Object base)
            }
        }
     }
-  UNBLOCK_INPUT;
+  unblock_input ();
 #else  /* not 0 */
   /* But, we don't have to call Fclear_face_cache if no fontset has
      been realized from BASE.  */
@@ -1880,6 +1879,8 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
     }
   if (! CHAR_VALID_P (c))
     return Qnil;
+  if (!FRAME_WINDOW_P (f))
+    return Qnil;
   face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c, pos, Qnil);
   face = FACE_FROM_ID (f, face_id);
   if (face->font)