This function decrements the table-edit count for document
doc (or the active document, if
doc is omitted). If the count is zero and
success is also zero, it calls
undo to discard any changes to the document since the corresponding call to
tbl_edit_open.
This function always returns 1.