home *** CD-ROM | disk | FTP | other *** search
- The setf macro will now handle all car and cdr forms (i.e. c{ad}+r).
- Thanks to peter norvig for this.
-
- There is a new macro called 'defvar'. It is used to declare special
- variables and optionally to give them an initial value. It is used
- at top level in a file (outside of defuns).
-
- forms:
- (defvar foo) ; declares foo to be special
- (defvar bar 3) ; declares bar to be special and when this file is read in
- ; bar will be given the value 3 if it is unbound.
- An advantage of '(defvar foo)' over '(declare (special foo))' is that if
- a file containing defvars is loaded (or fasl'ed) in during compilation,
- the variables mentioned in the defvar's will be declared special. The only
- way to have that effect with '(declare (special foo))' is to 'include'
- the file.
-
- There is a new macro, 'environment', which can be used at the beginning of
- a file to specify what sort of environment this file needs in order to be
- compiled or run. For example:
- (environment (compile eval) (files mymacros othermacros)
- (compile) (syntax maclisp))
-
- says that when compiling or loading into the interpreter, the files
- mymacros and othermacros should be loaded (if they aren't loaded already).
- When compiling, the maclisp syntax should be used.
- The general form of 'environment' is:
- (environment when1 what1
- when2 what2
- ... ...
- whenN whatN)
- the when's are a subset of (eval compile load), and the symbols have the
- same meaning as they do in 'eval-when'.
- The what's are either
- (files file1 file2 ... fileN)
- insure that the named files are loaded. To see if fileX
- is loaded, it looks for a 'version' property under
- fileX's property list. Thus to prevent multiple loading,
- you should put
- (putprop 'myfile t 'version) at the end of myfile.l
- (syntax type)
- type is either maclisp, intlisp, ucilisp, franzlisp
- This sets the syntax correctly.
-
- There are additional macros to set of standard environments:
- (environment-maclisp) sets up the maclisp environment. This is what
- you would get by using the -m switch to liszt.
-
- (environment-lmlisp) sets up the lisp machine environment. This is like
- maclisp but it has additional macros.
-
-
- It is possible to add when's and what's to the specialized environments,
- e.g.
- (environment-maclisp (compile eval) (files foo bar))
-
-
-
-
-
-
-
-