Mercurial > emacs
comparison src/.gdbinit @ 57911:d1917e4b98e7
(ppt): New function.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Wed, 03 Nov 2004 12:49:39 +0000 |
parents | aca7edaa93d4 |
children | 5ee7eaad2958 7a0245dd1848 e24e2e78deda |
comparison
equal
deleted
inserted
replaced
57910:d7a9a0abcae2 | 57911:d1917e4b98e7 |
---|---|
66 set debug_print ($tmp) | 66 set debug_print ($tmp) |
67 end | 67 end |
68 document pp | 68 document pp |
69 Print the argument as an emacs s-expression | 69 Print the argument as an emacs s-expression |
70 Works only when an inferior emacs is executing. | 70 Works only when an inferior emacs is executing. |
71 end | |
72 | |
73 # Print out current buffer point and boundaries | |
74 define ppt | |
75 set $b = current_buffer | |
76 set $t = $b->text | |
77 printf "BUF PT: %d", $b->pt | |
78 if ($b->pt != $b->pt_byte) | |
79 printf "[%d]", $b->pt_byte | |
80 end | |
81 printf " of 1..%d", $t->z | |
82 if ($t->z != $t->z_byte) | |
83 printf "[%d]", $t->z_byte | |
84 end | |
85 if ($b->begv != 1 || $b->zv != $t->z) | |
86 printf " NARROW=%d..%d", $b->begv, $b->zv | |
87 if ($b->begv != $b->begv_byte || $b->zv != $b->zv_byte) | |
88 printf " [%d..%d]", $b->begv_byte, $b->zv_byte | |
89 end | |
90 end | |
91 printf " GAP: %d", $t->gpt | |
92 if ($t->gpt != $t->gpt_byte) | |
93 printf "[%d]", $t->gpt_byte | |
94 end | |
95 printf " SZ=%d\n", $t->gap_size | |
96 end | |
97 document ppt | |
98 Print point, beg, end, narrow, and gap for current buffer. | |
71 end | 99 end |
72 | 100 |
73 define xtype | 101 define xtype |
74 xgettype $ | 102 xgettype $ |
75 output $type | 103 output $type |