1 # Set up something to print out s-expressions.
3 set Fprin1 ($, Qexternal_debugging_output)
7 Print the emacs s-expression which is $.
8 Works only when an inferior emacs is executing.
11 # Set this to the same thing as the DATA_SEG_BITS macro in your
12 # machine-description files.
13 set $data_seg_bits = 0
16 output (enum Lisp_Type) (($ >> 24) & 0x7f)
20 Print the type of $, assuming it is an Elisp value.
24 print (($ & 0x00ffffff) << 8) >> 8
27 Print $, assuming it is an Elisp integer. This gets the sign right.
31 print (void *) (($ & 0x00ffffff) | $data_seg_bits)
34 Print the pointer portion of $, assuming it is an Elisp value.
38 print (struct window *) (($ & 0x00ffffff) | $data_seg_bits)
39 printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top
42 Print $ as a window pointer, assuming it is an Elisp window value.
43 Print the window's position as "WIDTHxHEIGHT+LEFT+TOP".
47 print (struct Lisp_Marker *) (($ & 0x00ffffff) | $data_seg_bits)
50 Print $ as a marker pointer, assuming it is an Elisp marker value.
54 print (struct buffer *) (($ & 0x00ffffff) | $data_seg_bits)
55 output &((struct Lisp_String *) ((($->name) & 0x00ffffff) | $data_seg_bits))->data
59 Set $ as a buffer pointer, assuming it is an Elisp buffer value.
60 Print the name of the buffer.
64 print (struct Lisp_Symbol *) (($ & 0x00ffffff) | $data_seg_bits)
69 Print the name and address of the symbol $.
70 This command assumes that $ is an Elisp symbol value.
74 print (struct Lisp_String *) (($ & 0x00ffffff) | $data_seg_bits)
75 output ($->size > 10000) ? "big string" : ($->data[0])@($->size)
79 Print the contents and address of the string $.
80 This command assumes that $ is an Elisp string value.
84 print (struct Lisp_Vector *) (($ & 0x00ffffff) | $data_seg_bits)
85 output ($->size > 1000) ? "big vector" : ($->contents[0])@($->size)
89 Print the contents and address of the vector $.
90 This command assumes that $ is an Elisp vector value.
94 print (struct frame *) (($ & 0x00ffffff) | $data_seg_bits)
97 Print $ as a frame pointer, assuming it is an Elisp frame value.
101 print (struct Lisp_Cons *) (($ & 0x00ffffff) | $data_seg_bits)
106 Print the contents of $, assuming it is an Elisp cons.
110 print ((($ >> 24) & 0x7f) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & 0x00ffffff) | $data_seg_bits))->car : 0)
113 Print the car of $, assuming it is an Elisp pair.
117 print ((($ >> 24) & 0x7f) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & 0x00ffffff) | $data_seg_bits))->cdr : 0)
120 Print the cdr of $, assuming it is an Elisp pair.
124 print (struct Lisp_Subr *) (($ & 0x00ffffff) | $data_seg_bits)
129 Print the address of the subr which the Lisp_Object $ points to.
134 unset environment TERMCAP
135 unset environment TERM
136 echo TERMCAP and TERM environment variables unset.\n
137 show environment DISPLAY
140 # Don't let abort actually run, as it will make
141 # stdio stop working and therefore the `pr' command below as well.
144 # If we are running in synchronous mode, we want a chance to look around
145 # before Emacs exits. Perhaps we should put the break somewhere else
147 break _XPrintDefaultError