Mercurial > hg > xemacs-beta
diff src/data.c @ 4846:a98ca4640147
clean up object print methods
casetab.c, console.c, data.c, database.c, device-msw.c, device.c, eval.c, file-coding.c, frame.c, glyphs.c, gui.c, keymap.c, lisp.h, mule-charset.c, objects.c, print.c, process.c, tooltalk.c, ui-gtk.c, window.c:
New function printing_unreadable_lcrecord(). Automatically
prints the type name and pointer value of the object. Use it
instead of printing_unreadable_object(); make that latter
function local to print.c.
window.c: During creation, window may have Qt as its buffer. Don't
crash if trying to print such a window.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 13 Jan 2010 05:49:13 -0600 |
parents | aa5ed11f473b |
children | 6772ce4d982b 19a72041c5ed |
line wrap: on
line diff
--- a/src/data.c Wed Jan 13 04:25:15 2010 -0600 +++ b/src/data.c Wed Jan 13 05:49:13 2010 -0600 @@ -2592,7 +2592,7 @@ int UNUSED (escapeflag)) { if (print_readably) - printing_unreadable_object ("#<weak-list>"); + printing_unreadable_lcrecord (obj, 0); write_fmt_string_lisp (printcharfun, "#<weak-list %s %S>", 2, encode_weak_list_type (XWEAK_LIST (obj)->type), @@ -3067,12 +3067,12 @@ } static void -print_weak_box (Lisp_Object UNUSED (obj), Lisp_Object printcharfun, +print_weak_box (Lisp_Object obj, Lisp_Object printcharfun, int UNUSED (escapeflag)) { if (print_readably) - printing_unreadable_object ("#<weak_box>"); - write_fmt_string (printcharfun, "#<weak_box>"); + printing_unreadable_lcrecord (obj, 0); + write_fmt_string (printcharfun, "#<weak-box>"); /* #### fix */ } static int @@ -3293,12 +3293,12 @@ } static void -print_ephemeron (Lisp_Object UNUSED (obj), Lisp_Object printcharfun, +print_ephemeron (Lisp_Object obj, Lisp_Object printcharfun, int UNUSED (escapeflag)) { if (print_readably) - printing_unreadable_object ("#<ephemeron>"); - write_fmt_string (printcharfun, "#<ephemeron>"); + printing_unreadable_lcrecord (obj, 0); + write_fmt_string (printcharfun, "#<ephemeron>"); /* #### fix */ } static int