+define xpr
+ xtype
+ if $type == Lisp_Int
+ xint
+ end
+ if $type == Lisp_Symbol
+ xsymbol
+ end
+ if $type == Lisp_String
+ xstring
+ end
+ if $type == Lisp_Cons
+ xcons
+ end
+ if $type == Lisp_Float
+ xfloat
+ end
+ if $type == Lisp_Misc
+ set $misc = (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type)
+ if $misc == Lisp_Misc_Free
+ xmiscfree
+ end
+ if $misc == Lisp_Misc_Boolfwd
+ xboolfwd
+ end
+ if $misc == Lisp_Misc_Marker
+ xmarker
+ end
+ if $misc == Lisp_Misc_Intfwd
+ xintfwd
+ end
+ if $misc == Lisp_Misc_Boolfwd
+ xboolfwd
+ end
+ if $misc == Lisp_Misc_Objfwd
+ xobjfwd
+ end
+ if $misc == Lisp_Misc_Buffer_Objfwd
+ xbufobjfwd
+ end
+ if $misc == Lisp_Misc_Buffer_Local_Value
+ xbuflocal
+ end
+# if $misc == Lisp_Misc_Some_Buffer_Local_Value
+# xvalue
+# end
+ if $misc == Lisp_Misc_Overlay
+ xoverlay
+ end
+ if $misc == Lisp_Misc_Kboard_Objfwd
+ xkbobjfwd
+ end
+# if $misc == Lisp_Misc_Save_Value
+# xsavevalue
+# end
+ end
+ if $type == Lisp_Vectorlike
+ set $size = ((struct Lisp_Vector *) $ptr)->size
+ if ($size & PVEC_FLAG)
+ set $vec = (enum pvec_type) ($size & PVEC_TYPE_MASK)
+ if $vec == PVEC_NORMAL_VECTOR
+ xvector
+ end
+ if $vec == PVEC_PROCESS
+ xprocess
+ end
+ if $vec == PVEC_FRAME
+ xframe
+ end
+ if $vec == PVEC_COMPILED
+ xcompiled
+ end
+ if $vec == PVEC_WINDOW
+ xwindow
+ end
+ if $vec == PVEC_WINDOW_CONFIGURATION
+ xwinconfig
+ end
+ if $vec == PVEC_SUBR
+ xsubr
+ end
+ if $vec == PVEC_CHAR_TABLE
+ xchartable
+ end
+ if $vec == PVEC_BOOL_VECTOR
+ xboolvector
+ end
+ if $vec == PVEC_BUFFER
+ xbuffer
+ end
+ if $vec == PVEC_HASH_TABLE
+ xhashtable
+ end
+ else
+ xvector
+ end
+ end
+end
+document xpr
+Print $ as a lisp object of any type.
+end
+