[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: GJC at MIT-MC
- Subject: Re: /\
- From: Robert W. Kerns <RWK at MIT-MC>
- Date: Mon ,26 Jan 81 05:40:00 EDT
- Cc: LISP-FORUM at MIT-MC
Date: 25 January 1981 10:01-EST
From: George J. Carrette <GJC at MIT-MC>
To: LISP-FORUM at MIT-MC
For maclisp users, an unwind-protected END-OF-FILE-EVAL-QUEUE
would be sufficient to set up local modes of all kinds, since
Emacs doesn't actually do a lisp read on the file.
#.(PROGN (PUSH '(RESET-SLASH-SYNTAX) END-OF-FILE-EVAL-QUEUE)
[There is a slight problem with sub-loading and the dynamic scope of
readtable et. al.]
By the way, isn't read-time evaluation considered *problematic*?
Actually, the next LISP (XLISP) has two new variables:
FILE-EXIT-FUNCTIONS and FILE-EXIT-FUNCTIONS-DEFAULT. Each LOAD
binds FILE-EXIT-FUNCTIONS to FILE-EXIT-FUNCTIONS-DEFAULT. These
are lists of functions of one argument. When the file is finished,
each function is popped off the list and called on an argument of
(). If the file is exited abnormally (^G or *THROW), it is called
on the file array. (Mostly because this is the only useful non-null
object I could think of, but it does let you report the filepos
that got an error).
There are a number of other things to do with this besides local modes.
One of the more important is to defer setting the VERSION property of
a file (which says whether it has previously been loaded by MacLisp
convention) until the file has been fully loaded, thus preventing
^G'd loads from breaking things due to half-loaded files. Another
common case is to perform some setup action after all forms in the file
have been performed, such as flavor compilation, etc.