Mercurial > hg > xemacs-beta
comparison src/objects.c @ 343:8bec6624d99b r21-1-1
Import from CVS: tag r21-1-1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:52:53 +0200 |
parents | c5d627a313b1 |
children | cc15677e0335 |
comparison
equal
deleted
inserted
replaced
342:b036ce23deaa | 343:8bec6624d99b |
---|---|
259 error ("printing unreadable object #<font-instance 0x%x>", f->header.uid); | 259 error ("printing unreadable object #<font-instance 0x%x>", f->header.uid); |
260 write_c_string ("#<font-instance ", printcharfun); | 260 write_c_string ("#<font-instance ", printcharfun); |
261 print_internal (f->name, printcharfun, 1); | 261 print_internal (f->name, printcharfun, 1); |
262 write_c_string (" on ", printcharfun); | 262 write_c_string (" on ", printcharfun); |
263 print_internal (f->device, printcharfun, 0); | 263 print_internal (f->device, printcharfun, 0); |
264 MAYBE_DEVMETH (XDEVICE (f->device), print_font_instance, | 264 if (!NILP (f->device)) |
265 (f, printcharfun, escapeflag)); | 265 MAYBE_DEVMETH (XDEVICE (f->device), print_font_instance, |
266 (f, printcharfun, escapeflag)); | |
266 sprintf (buf, " 0x%x>", f->header.uid); | 267 sprintf (buf, " 0x%x>", f->header.uid); |
267 write_c_string (buf, printcharfun); | 268 write_c_string (buf, printcharfun); |
268 } | 269 } |
269 | 270 |
270 static void | 271 static void |
417 static Lisp_Object | 418 static Lisp_Object |
418 font_instance_truename_internal (Lisp_Object font_instance, | 419 font_instance_truename_internal (Lisp_Object font_instance, |
419 Error_behavior errb) | 420 Error_behavior errb) |
420 { | 421 { |
421 struct Lisp_Font_Instance *f = XFONT_INSTANCE (font_instance); | 422 struct Lisp_Font_Instance *f = XFONT_INSTANCE (font_instance); |
422 struct device *d = XDEVICE (f->device); | 423 |
423 return DEVMETH_OR_GIVEN (d, font_instance_truename, (f, errb), f->name); | 424 if (NILP (f->device)) |
425 { | |
426 maybe_signal_simple_error ("Couldn't determine font truename", | |
427 font_instance, Qfont, errb); | |
428 return Qnil; | |
429 } | |
430 | |
431 return DEVMETH_OR_GIVEN (XDEVICE (f->device), | |
432 font_instance_truename, (f, errb), f->name); | |
424 } | 433 } |
425 | 434 |
426 DEFUN ("font-instance-truename", Ffont_instance_truename, 1, 1, 0, /* | 435 DEFUN ("font-instance-truename", Ffont_instance_truename, 1, 1, 0, /* |
427 Return the canonical name of FONT-INSTANCE. | 436 Return the canonical name of FONT-INSTANCE. |
428 Font names are patterns which may match any number of fonts, of which | 437 Font names are patterns which may match any number of fonts, of which |
442 { | 451 { |
443 struct Lisp_Font_Instance *f; | 452 struct Lisp_Font_Instance *f; |
444 | 453 |
445 CHECK_FONT_INSTANCE (font_instance); | 454 CHECK_FONT_INSTANCE (font_instance); |
446 f = XFONT_INSTANCE (font_instance); | 455 f = XFONT_INSTANCE (font_instance); |
456 | |
457 if (NILP (f->device)) | |
458 return Qnil; | |
447 | 459 |
448 return MAYBE_LISP_DEVMETH (XDEVICE (f->device), | 460 return MAYBE_LISP_DEVMETH (XDEVICE (f->device), |
449 font_instance_properties, (f)); | 461 font_instance_properties, (f)); |
450 } | 462 } |
451 | 463 |