[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Detecting mismatched parens better
- To: DLA at MIT-AI
- Subject: Detecting mismatched parens better
- From: Richard M. Stallman <RMS at MIT-AI>
- Date: Wed ,20 Jan 82 23:22:00 EDT
- Cc: BUG-LISPM at MIT-AI
I agree that macroexpansion errors and reader errors are similar
issues, and I've often wanted warnings for macroexpansion errors too.
A punt vs bomb switch would be fine; then a poll should be used to
determine the best default for it.
But to get the most informative and appropriate warning info after
punting a reader error, it is necessary to get back in synch in the
file, which requires something of the sort I was proposing.
It's also possible that this switch should depend on the context of
compilation (editor buffer vs QC-FILE vs flavor recompilation). The
advantages of punting are not so significant when compiling single
functions. My proposal was conceived for QC-FILE, and please think in
terms of QC-FILE (and things which call it) when you evaluate the
proposal or alternative ideas, because the other kinds of compilation
don't have to use them.
The idea of checking parens while saving the file is interesting.
Would someone like to implement this so we can see whether it solves
the problem? There can be a switch to turn on the feature, which
could be overridden by a file property, and ultimately a poll to
choose the default for the switch.
Note that punting on errors doesn't force the user to wait out the
rest of the compilation. He can always type C-Abort and fix it right
away. For that matter, he could do so as soon as he sees a FOO
declared special warning. He could go fix it and recompile. But
nobody wants to do this; users find it DESIRABLE to wait for the
warnings from the rest of the file. I suggest that you might find
it equally desirable not to abort at a reader error--IF the compiler
were going to give the right warnings.