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

10.2.2 Template-based Authoring

Emacspeak supports two powerful template-based authoring subsystems that enable the user to quickly create and fill in templates. Dmacro (short for “dynamic macros”) allows the user to define and invoke template-based macros that are specialized for creating different types of content. For example, when programming in C, the user can invoke dynamic macros that insert skeletons of standard C constructs with a few keystrokes. This form of editing has numerous advantages in creating consistently structured code when developing large software modules. Emacspeak speech-enables mode dmacro to provide succinct spoken feedback as templates are created and filled. The user invokes dmacro via command insert dmacro, which is typically bound to a single key. This results in a dialog where the user is prompted to pick one of the dynamic macros available in the current context. If the users choice can be uniquely completed, that completion is spoken; otherwise, the list of possible completions based on the available partial input is spoken, accompanied by auditory icon help.

An alternative template-editing facility is provided by mode tempo This mode is designed to be used in creating template-based editing tools for specific markup languages; a good example is mode html-helper, a mode for creating and updating HTML documents for publishing on the WWW (see see Document Authoring).