5 Interface Functions

If you need to write a mode based on vtable, you will have to interact with the table in various ways—for instance, you’ll need to write commands that updates an object and then displays the result. This chapter describes functions for such interaction.

Function: vtable-current-table

This function returns the table under point.

Function: vtable-current-object

This function returns the object on the current line. (Note that this is the original object, not the characters displayed in the buffer.)

Function: vtable-current-column

This function returns the column index of the column under point.

Function: vtable-goto-table table

Move point to the start of table and return the position. If table can’t be found in the current buffer, don’t move point and return nil.

Function: vtable-goto-object object

Move point to the start of the line where object is displayed in the current table and return the position. If object can’t be found, don’t move point and return nil.

Function: vtable-goto-column index

Move point to the start of the indexth column. (The first column is numbered zero.)

Function: vtable-beginning-of-table

Move to the beginning of the current table.

Function: vtable-end-of-table

Move to the end of the current table.

Function: vtable-remove-object table object

Remove object from table. This also updates the displayed table.

Function: vtable-insert-object table object &optional after-object

Insert object into table. If after-object, insert the object after this object; otherwise append to table. This also updates the displayed table.

Function: vtable-update-object table object old-object

Change old-object into object in table. This also updates the displayed table.

This has the same effect as calling vtable-remove-object and then vtable-insert-object, but is more efficient.

Function: vtable-column table index

Return the column name of the indexth column in table.