A buffer's undo and redo stacks; zero is empty. Use undo, redo, begin_group and end_group rather than reading it.
undo
redo
begin_group
end_group