Changes between Version 2 and Version 3 of HemlockProgrammer/HemlockVariables


Ignore:
Timestamp:
Jan 15, 2008, 12:02:16 AM (12 years ago)
Author:
gz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HemlockProgrammer/HemlockVariables

    v2 v3  
     1[HemlockProgrammer Back to Table of Contents]
    12[[PageOutline]]
    23
     
    1011 3. There is a database of variable names and documentation which makes it easier to find out what variables exist and what their values mean.
    1112
    12 == 6.1. Variable Names ==
     13== 6.1. Variable Names ==#VariableNames
    1314
    1415To the user, a variable name is a case insensitive string.  This
     
    1819In Lisp code a variable name is a symbol.  The name of this symbol is
    1920created by replacing any spaces in the string name with hyphens.  This
    20 symbol name is always interned in the Hemlock package and referring to
    21 a symbol with the same name in the wrong package is an error.
     21symbol name is always interned in the Hemlock package.
    2222
    23 *global-variable-names* [Variable]
     23`*global-variable-names*` [Variable]
    2424
    2525This variable holds a string-table of the names of all the global
     
    2727variable.
    2828
    29 current-variable-tables [Function]
     29`current-variable-tables` [Function]
    3030
    3131This function returns a list of variable tables currently established,
    32 globally, in the current-buffer, and by the modes of the
     32globally, in the current buffer, and by the modes of the
    3333current-buffer. This list is suitable for use with
    3434prompt-for-variable.
    3535
    36 == 6.2. Variable Functions ==
     36== 6.2. Variable Functions ==#VariableFunctions
    3737In the following descriptions name is the symbol name of the variable.
    3838
    39 defhvar string-name documentation &key :mode :buffer :hooks :value [Function]
     39`defhvar` string-name documentation &key :mode :buffer :hooks :value [Function]
    4040
    4141This function defines a Hemlock variable. Functions that take a
     
    4949
    5050 :mode, :buffer::
    51  If buffer is supplied, the variable is local to that buffer.  If mode
    52  is supplied, it is local to that mode.  If neither is supplied, it is
    53  global.
     51 If buffer is supplied, the variable is local to that buffer.  If mode is supplied, it is local to that mode.  If neither is supplied, it is global.
    5452
    5553 :value::
    56   This is the initial value for the variable, which defaults tonil.
     54  This is the initial value for the variable, which defaults to nil.
    5755
    5856 :hooks::
    59   This is the initial list of functions to call when someone sets the
    60   variable's value. These functions execute before Hemlock establishes
    61   the new value. See variable-valuefor the arguments passed to the
    62   hook functions.
     57  This is the initial list of functions to call when someone sets the variable's value. These functions execute before Hemlock establishes the new value. See variable-value for the arguments passed to the hook functions.
    6358
    6459If a variable with the same name already exists in the same place,
     
    6661supplies these keywords.
    6762
    68 variable-value name &optional kind where [Function]
     63`variable-value` name &optional kind where [Function]
    6964
    7065This function returns the value of a Hemlock variable in some place. The following values for kind are defined:
    7166
    7267 :current::
    73   Return the value present in the current environment, taking into
    74   consideration anymode or buffer local variables.  This is the
    75   default.
     68  Return the value present in the current environment, taking into consideration any mode or buffer local variables.  This is the default.
    7669
    7770 :global::
    7871  Return the global value.
     72
    7973 :mode::
    80   Return the value in the mode namedwhere.
     74  Return the value in the mode named where.
    8175
    8276 :buffer
     
    8781the new value.
    8882
    89 variable-documentation name &optional kind where [Function]
     83`variable-documentation` name &optional kind where [Function]
    9084
    91 variable-hooks name &optional kind where [Function]
     85`variable-hooks` name &optional kind where [Function]
    9286
    93 variable-name name &optional kind where [Function]
     87`variable-name` name &optional kind where [Function]
    9488
    9589These function return the documentation, hooks and string name of a
     
    9791variable-value. The documentation and hook list may be set using setf.
    9892
    99 string-to-variable string [Function]
     93`string-to-variable` string [Function]
    10094
    10195This function converts a string into the corresponding variable symbol
    102 name. Stringneed not be the name of an actual Hemlock variable.
     96name. String need not be the name of an actual Hemlock variable.
    10397
    104 value name [Macro]
    105 
    106 setv name new-value [Macro]
     98`value` name [Macro][[BR]]
     99`setv` name new-value [Macro][[BR]]
    107100
    108101These macros get and set the current value of the Hemlock variable
    109 name. Name is not evaluated.  There is a setf form forvalue.
     102name. Name is not evaluated.  There is a setf form for `value`.
    110103
    111 hlet ({(var value)}*){form}* [Macro]
     104`hlet` ({(var value)}*){form}* [Macro]
    112105
    113106This macro is very similar to let in effect; within its scope each of
     
    117110returned.
    118111
    119 hemlock-bound-p name &optional kind where [Function]
     112`hemlock-bound-p` name &optional kind where [Function]
    120113
    121114Returns t if name is defined as a Hemlock variable in the place
    122115specified by kind and where, or nil otherwise.
    123116
    124 delete-variable name &optional kind where [Function]
    125 
    126 Delete Variable Hook [Hemlock Variable]
     117`delete-variable` name &optional kind where [Function][[BR]]
     118`Delete Variable Hook` [Hemlock Variable]
    127119
    128120delete-variable makes the Hemlock variable name no longer defined in
     
    135127variable is deleted.
    136128
    137 == 6.3. Hooks ==
     129== 6.3. Hooks ==#Hooks
    138130
    139131Hemlock actions such as setting variables, changing buffers, changing
     
    153145interpretation of the hook place argument.
    154146
    155 add-hook place hook-fun [Macro]
    156 
    157 remove-hook place hook-fun [Macro]
     147`add-hook` place hook-fun [Macro][[BR]]
     148`remove-hook` place hook-fun [Macro][[BR]]
    158149
    159150These macros add or remove a hook function in some place. If hook-fun
     
    168159}}}
    169160
    170 invoke-hook place &restargs [Macro]
     161`invoke-hook` place &rest args [Macro]
    171162
    172163This macro calls all the functions in place. If place is a symbol,
     
    174165variable.
    175166
     167
     168[HemlockProgrammer Back to Table of Contents]