Next: , Previous: Notes on internals, Up: Extending versor



10.2 Adding new commands

Most interactive Versor commands should have, as the outermost level of their body, the macro versor-as-motion-command, which handles the block cursor (selection highlighting). in the code within versor-as-motion-command, you can call versor-set-current-item, passing in the beginning and end of the new selection, and the new selection will be displayed automatically at the end of versor-as-motion-command. If you do not call versor-set-current-item, versor-as-motion-command will try to work out an appropriate selection for the current dimension.

If you want a multipart selection, you can call versor-set-current-items, passing in a list of conses of start and end positions, or a list of overlays.


SourceForge.net Logo