1 # Set up something to print out s-expressions.
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 set $data_seg_bits = 0x10000000
19 Set up the xfoo macros to deal with the MIPS processor.
20 Specifically, this sets $data_seg_bits to the right thing.
24 output (enum Lisp_Type) (($ >> 24) & 0x7f)
28 Print the type of $, assuming it is an Elisp value.
32 print (($ & 0x00ffffff) << 8) >> 8
35 Print $, assuming it is an Elisp integer. This gets the sign right.
39 print (void *) (($ & 0x00ffffff) | $data_seg_bits)
42 Print the pointer portion of $, assuming it is an Elisp value.
46 print (struct window *) (($ & 0x00ffffff) | $data_seg_bits)
47 printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top
50 Print $ as a window pointer, assuming it is an Elisp window value.
51 Print the window's position as "WIDTHxHEIGHT+LEFT+TOP".
55 print (struct Lisp_Marker *) (($ & 0x00ffffff) | $data_seg_bits)
58 Print $ as a marker pointer, assuming it is an Elisp marker value.
62 print (struct buffer *) (($ & 0x00ffffff) | $data_seg_bits)
63 output &((struct Lisp_String *) ((($->name) & 0x00ffffff) | $data_seg_bits))->data
67 Set $ as a buffer pointer, assuming it is an Elisp buffer value.
68 Print the name of the buffer.
72 print (struct Lisp_Symbol *) (($ & 0x00ffffff) | $data_seg_bits)
77 Print the name and address of the symbol $.
78 This command assumes that $ is an Elisp symbol value.
82 print (struct Lisp_String *) (($ & 0x00ffffff) | $data_seg_bits)
83 output ($->size > 10000) ? "big string" : ($->data[0])@($->size)
87 Print the contents and address of the string $.
88 This command assumes that $ is an Elisp string value.
92 print (struct Lisp_Vector *) (($ & 0x00ffffff) | $data_seg_bits)
93 output ($->size > 1000) ? "big vector" : ($->contents[0])@($->size)
97 Print the contents and address of the vector $.
98 This command assumes that $ is an Elisp vector value.
102 print (struct frame *) (($ & 0x00ffffff) | $data_seg_bits)
105 Print $ as a frame pointer, assuming it is an Elisp frame value.
109 print (struct Lisp_Cons *) (($ & 0x00ffffff) | $data_seg_bits)
114 Print the contents of $, assuming it is an Elisp cons.
118 print ((($ >> 24) & 0x7f) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & 0x00ffffff) | $data_seg_bits))->car : 0)
121 Print the car of $, assuming it is an Elisp pair.
125 print ((($ >> 24) & 0x7f) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & 0x00ffffff) | $data_seg_bits))->cdr : 0)
128 Print the cdr of $, assuming it is an Elisp pair.
132 print (struct Lisp_Subr *) (($ & 0x00ffffff) | $data_seg_bits)
137 Print the address of the subr which the Lisp_Object $ points to.
141 print (struct Lisp_Process *) (($ & 0x00ffffff) | $data_seg_bits)
146 Print the address of the struct Lisp_process which the Lisp_Object $ points to.
150 print ((struct Lisp_Float *) (($ & 0x00ffffff) | $data_seg_bits))->data
153 Print $ assuming it is a lisp floating-point number.
157 print (struct scrollbar *) (($ & 0x00ffffff) | $data_seg_bits)
162 Print $ as a scrollbar pointer.
166 set print sevenbit-strings
168 show environment DISPLAY
169 show environment TERM
170 set args -geometry 80x40+0+0
172 # Don't let abort actually run, as it will make
173 # stdio stop working and therefore the `pr' command above as well.
176 # If we are running in synchronous mode, we want a chance to look around
177 # before Emacs exits. Perhaps we should put the break somewhere else
179 break _XPrintDefaultError