diff src/objects.c @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents 8bec6624d99b
children 8626e4521993
line wrap: on
line diff
--- a/src/objects.c	Mon Aug 13 11:01:58 2007 +0200
+++ b/src/objects.c	Mon Aug 13 11:03:08 2007 +0200
@@ -261,9 +261,8 @@
   print_internal (f->name, printcharfun, 1);
   write_c_string (" on ", printcharfun);
   print_internal (f->device, printcharfun, 0);
-  if (!NILP (f->device))
-    MAYBE_DEVMETH (XDEVICE (f->device), print_font_instance,
-		   (f, printcharfun, escapeflag));
+  MAYBE_DEVMETH (XDEVICE (f->device), print_font_instance,
+		 (f, printcharfun, escapeflag));
   sprintf (buf, " 0x%x>", f->header.uid);
   write_c_string (buf, printcharfun);
 }
@@ -420,16 +419,8 @@
 				 Error_behavior errb)
 {
   struct Lisp_Font_Instance *f = XFONT_INSTANCE (font_instance);
-  
-  if (NILP (f->device))
-    {
-      maybe_signal_simple_error ("Couldn't determine font truename",
-				 font_instance, Qfont, errb);
-      return Qnil;
-    }
-  
-  return DEVMETH_OR_GIVEN (XDEVICE (f->device),
-			   font_instance_truename, (f, errb), f->name);
+  struct device *d = XDEVICE (f->device);
+  return DEVMETH_OR_GIVEN (d, font_instance_truename, (f, errb), f->name);
 }
 
 DEFUN ("font-instance-truename", Ffont_instance_truename, 1, 1, 0, /*
@@ -454,9 +445,6 @@
   CHECK_FONT_INSTANCE (font_instance);
   f = XFONT_INSTANCE (font_instance);
 
-  if (NILP (f->device))
-    return Qnil;
-
   return MAYBE_LISP_DEVMETH (XDEVICE (f->device),
 			     font_instance_properties, (f));
 }