Changes between Version 1 and Version 2 of HemlockProgrammer/Modes


Ignore:
Timestamp:
01/15/08 01:16:05 (7 years ago)
Author:
gz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HemlockProgrammer/Modes

    v1 v2  
     1[HemlockProgrammer Back to Table of Contents] 
    12[[PageOutline]] 
    23 
     
    56A mode is a collection of Hemlock values which may be present in the 
    67current environment (page 21) depending on the editing task at hand. 
    7 Examples of typical modes are Lisp, for editing Lisp code, and Echo 
    8 Area, for prompting in the echo area. 
     8An example of a typical mode is Lisp, for editing Lisp code. 
    99 
    10 == 8.1. Mode Hooks == 
     10== 8.1. Mode Hooks ==#ModeHooks 
    1111 
    1212When a mode is added to or removed from a buffer, its mode hook is 
     
    1414and t if the mode is being added or nil if it is being removed.  Mode 
    1515hooks are typically used to make a mode do something additional to 
    16 what it usually does.  One might, for example, make a text mode hook 
     16what it usually does.  One might, for example, make a Text mode hook 
    1717that turned on auto-fill mode when you entered. 
    1818 
    19 == 8.2. Major and Minor Modes == 
     19== 8.2. Major and Minor Modes ==#MajorAndMinorModes 
    2020 
    2121There are two kinds of modes, major modes and minor modes. A buffer 
     
    3131are in effect. 
    3232 
    33 Default Modes(initial value("Fundamental" "Save")) [Hemlock Variable] 
     33`Default Modes` (initial value `'("Fundamental" "Save")`) [Hemlock Variable] 
    3434 
    3535This variable contains a list of mode names which are instantiated in 
    3636a buffer when no other information is available. 
    3737 
    38 *mode-names* [Variable] 
     38`*mode-names*` [Variable] 
    3939 
    4040Holds a string-table of the names of all the modes. 
    4141 
    42 Illegal [Command] 
     42`Illegal` [Command] 
    4343 
    4444This is a useful command to bind in modes that wish to shadow global 
     
    4747command calls editor-error. 
    4848 
    49 == 8.3. Mode Functions == 
    50 defmode name &key :setup-function :cleanup-function :major-p [Function] 
    51 :precedence :transparent-p :documentation 
     49== 8.3. Mode Functions ==#ModeFunctions 
     50 
     51`defmode` name &key :setup-function :cleanup-function :major-p :precedence :transparent-p :documentation [Function] 
    5252 
    5353This function defines a new mode named name, and enters it in 
     
    6767determines which value is found when there are several definitions. 
    6868 
    69 Transparent-pdetermines whether key bindings local to the defined mode 
     69Transparent-p determines whether key bindings local to the defined mode 
    7070are transparent.  Transparent key bindings are invoked in addition to 
    7171the first normal key binding found rather than shadowing less local 
    7272key bindings. 
    7373 
    74 Documentationis some introductory text about the mode.  Commands such 
     74Documentation is some introductory text about the mode.  Commands such 
    7575as Describe Mode use this. 
    7676 
    77 mode-documentation name [Function] 
     77`mode-documentation` name [Function] 
    7878 
    7979This function returns the documentation for the mode named name. 
    8080 
    81 buffer-major-mode buffer [Function] 
    82  
    83 Buffer Major Mode Hook [Hemlock Variable] 
     81`buffer-major-mode` buffer [Function][[BR]] 
     82`Buffer Major Mode Hook` [Hemlock Variable] 
    8483 
    8584buffer-major-mode returns the name of buffer's major mode.  The major 
     
    8786with buffer and the new mode. 
    8887 
    89 buffer-minor-mode buffer name [Function] 
    90  
    91 Buffer Minor Mode Hook [Hemlock Variable] 
     88`buffer-minor-mode` buffer name [Function][[BR]] 
     89`Buffer Minor Mode Hook` [Hemlock Variable][[BR]] 
    9290 
    9391buffer-minor-mode returns t if the minor mode name is active in 
     
    9694new value. 
    9795 
    98 mode-variablesname [Function] 
     96`mode-variables` name [Function] 
    9997 
    10098Returns the string-table of mode local variables. 
    10199 
    102 mode-major-pname [Function] 
     100`mode-major-p` name [Function] 
    103101 
    104102Returns t if name is the name of a major mode, or nil if it is the 
     
    106104mode. 
    107105 
     106[HemlockProgrammer Back to Table of Contents]