Next: , Previous: , Up: Editing Documents   [Contents][Index]


4.4 Scribe Mode

Scribe mode provides a number of facilities useful for editing Scribe documents. It is also sufficiently parameterizable to be adapted to other similar syntaxes.

Command: Scribe Mode

This command puts the current buffer in Scribe mode. Except for special Scribe commands, the only difference between Scribe mode and Text mode is that the rules for determining paragraph breaks are different. In Scribe mode, paragraphs delimited by Scribe commands are normally placed on their own line, in addition to the normal paragraph breaks. The main reason for doing this is that it prevents Fill Paragraph from mashing these commands into the body of a paragraph.

Command: Insert Scribe Directive stuff (C-h in Scribe mode)

This command prompts for a key-event to determine which Scribe directive to insert. Directives are inserted differently depending on their kind:

environment

The current or next paragraph is enclosed in a begin-end pair: @begin[directive] paragraph @end[directive]. If the current region is active, then this command encloses the region instead of the paragraph it would otherwise chose.

command

The previous word is enclosed by @directive[word]. If the previous word is already enclosed by a use of the same command, then the beginning of the command is extended backward by one word.

Typing Home or C-_ to this command’s prompt will display a list of all the defined key-events on which it dispatches.

Command: Add Scribe Directive

This command adds to the database of directives recognized by the Insert Scribe Directive command. It prompts for the directive’s name, the kind of directive (environment or command) and the key-event on which to dispatch.

Command: Add Scribe Paragraph Delimiter
Command: List Scribe Paragraph Delimiters

Add Scribe Paragraph Delimiter prompts for a string to add to the list of formatting commands that delimit paragraphs in Scribe mode. If the user supplies a prefix argument, then this command removes the string as a delimiter.

List Scribe Paragraph Delimiters displays in a pop-up window the Scribe commands that delimit paragraphs.

Hemlock Variable: Escape Character (initial value #\@)
Hemlock Variable: Close Paren Character (initial value #\)]
Hemlock Variable: Open Paren Character (initial value #\[)

These variables determine the characters used when a Scribe directive is inserted.

Command: Scribe Insert Bracket
Hemlock Variable: Scribe Bracket Table

Scribe Insert Bracket inserts a bracket (>, }, ), or ]), that caused its invocation, and then shows the matching bracket.

Scribe Bracket Table holds a simple-vector indexed by character codes. If a character is a bracket, then the entry for its char-code should be the opposite bracket. If a character is not a bracket, then the entry should be nil.


Next: Spelling Correction, Previous: Filling, Up: Editing Documents   [Contents][Index]