Commit 42a184ac authored by Noah Friedman's avatar Noah Friedman

Bring emacs-buffer.gdb up to date with recent lisp.h changes.

parent 559f1606
......@@ -81,7 +81,7 @@ set $yfile_buffers_only = 0
define ygetptr
set $ptr = $arg0
set $ptr = (CHECK_LISP_OBJECT_TYPE ? $ptr.i : $ptr) & VALMASK
set $ptr = (EMACS_INT) (CHECK_LISP_OBJECT_TYPE ? $ptr.i : $ptr) & VALMASK
end
# Get the value of Qnil for comparison. Needed when
......@@ -103,12 +103,12 @@ define ybuffer-list
ygetptr $alist
set $alist = $ptr
while $alist != $qnil
set $this = ((struct Lisp_Cons *) $ptr)->car
set $alist = ((struct Lisp_Cons *) $ptr)->u.cdr
set $this = ((struct Lisp_Cons *) $ptr)->u.s.car
set $alist = ((struct Lisp_Cons *) $ptr)->u.s.u.cdr
# Vbuffer_alist elts are pairs of the form (name . buffer)
ygetptr $this
set $buf = ((struct Lisp_Cons *) $ptr)->u.cdr
set $buf = ((struct Lisp_Cons *) $ptr)->u.s.u.cdr
ygetptr $buf
set $buf = (struct buffer *) $ptr
......@@ -116,17 +116,17 @@ define ybuffer-list
set $fname = $ptr
if ! ($files_only && $fname == $qnil)
ygetptr $buf->name_
set $name = ((struct Lisp_String *) $ptr)->data
set $name = ((struct Lisp_String *) $ptr)->u.s.data
set $modp = ($buf->text->modiff > $buf->text->save_modiff) ? '*' : ' '
ygetptr $buf->mode_name_
set $mode = ((struct Lisp_String *) $ptr)->data
set $mode = ((struct Lisp_String *) $ptr)->u.s.data
if $fname != $qnil
ygetptr $buf->filename_
printf "%2d %c %9d %-20s %-10s %s\n", \
$i, $modp, ($buf->text->z_byte - 1), $name, $mode, \
((struct Lisp_String *) $fname)->data
((struct Lisp_String *) $fname)->u.s.data
else
printf "%2d %c %9d %-20s %-10s\n", \
$i, $modp, ($buf->text->z_byte - 1), $name, $mode
......@@ -161,18 +161,18 @@ define yset-buffer
ygetptr $alist
set $alist = $ptr
while ($alist != $qnil && $i > 0)
set $alist = ((struct Lisp_Cons *) $ptr)->u.cdr
set $alist = ((struct Lisp_Cons *) $ptr)->u.s.u.cdr
ygetptr $alist
set $alist = $ptr
set $i--
end
# Get car of alist; this is a pair (name . buffer)
set $this = ((struct Lisp_Cons *) $alist)->car
set $this = ((struct Lisp_Cons *) $alist)->u.s.car
# Get the buffer object
ygetptr $this
set $this = ((struct Lisp_Cons *) $ptr)->u.cdr
set $this = ((struct Lisp_Cons *) $ptr)->u.s.u.cdr
ygetptr $this
set $ycurrent_buffer = (struct buffer *) $ptr
......@@ -206,7 +206,7 @@ end
define yget-current-buffer-name
set $this = $ycurrent_buffer->name_
ygetptr $this
set $ycurrent_buffer_name = ((struct Lisp_String *) $ptr)->data
set $ycurrent_buffer_name = ((struct Lisp_String *) $ptr)->u.s.data
end
document yget-current-buffer-name
Set $ycurrent_buffer_name to the name of the currently selected buffer.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment