[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Per-file options



A recent reply to someone asking about commas in (comment ...) 
constructions recommended doing (SSTATUS MACRO ...) to turn off
the commas, then possibly later re-enabling commas with another
(SSTATUS MACRO ..) call.  In order to turn off mcommas for a particular
file only, presumably there would be a SSTATUS at the beginning and
another at the end of the file.

If loading of that file is then aborted, naturally commas will be left
turned off.  This illustrates a general problem; namely, there is no
way that I know of to make certain changes temporarily in loading,
compiling, or whatever a file, without leaving things wrong or
inconsistent if there is a quit.

Would it be unreasonable to have some variable AFTER-LOAD-FORMS or
something which loading functions would bind, initially to NIL,
and then mapcar eval'ing down when loading is complete?  There
could also be an UNWIND-PROTECT in LOAD which would do the same
things, perhaps with there being some way for forms to tell whether
a normal load-termination or a quit was occurring.  This would allow
users to push forms onto AFTER-LOAD-FORMS and be sure they would
be evaluated, regardless of whether there was a quit or whether loading
terminated normally.  Then they could reset the things that they clobber
and truly make things per-file.  A similar list could be used by the
compiler, and perhaps other things that I haven't thought of.