Next: , Previous: , Up: High-Level Text Primitives   [Contents][Index]


15.1 Indenting Text

Hemlock Variable: Indent Function (initial value tab-to-tab-stop)

The value of this variable determines how indentation is done, and it is a function which is passed a mark as its argument. The function should indent the line that the mark points to. The function may move the mark around on the line. The mark will be :left-inserting. The default simply inserts a tab character at the mark. A function for Lisp mode probably moves the mark to the beginning of the line, deletes horizontal whitespace, and computes some appropriate indentation for Lisp code.

Hemlock Variable: Indent with Tabs (initial value indent-using-tabs)
Hemlock Variable: Spaces per Tab (initial value 8)

Indent with Tabs holds a function that takes a mark and a number of spaces. The function will insert a maximum number of tabs and a minimum number of spaces at mark to move the specified number of columns. The default definition uses Spaces per Tab to determine the size of a tab. Note, Spaces per Tab is not used everywhere in Hemlock yet, so changing this variable could have unexpected results.

Function: indent-region region
Function: indent-region-for-commands region

indent-region invokes the value of Indent Function on every line of region. indent-region-for-commands uses indent-region but first saves the region for the Undo command.

Function: delete-horizontal-space mark

This deletes all characters with a Space attribute (see section sys-def-chars) of 1.


Next: Lisp Text Buffers, Previous: High-Level Text Primitives, Up: High-Level Text Primitives   [Contents][Index]