Currently pp_cleanup() generates a non-fatal
error if "defining" is not NULL.
This should be refined. In particular, the
error should hint at an unfinished %(I)MACRO
if "defining->name" is not NULL, but at an
unfinished %REP if it is NULL.
Furthermore there should be a check to see
if "ctsk" is NULL (before it's being cleaned
out). If it is not, then there should be a
nonfatal error about context "cstk->name"
still being defined, i.e. a missing %POP.
Logged In: YES
user_id=806493
Agreed.
What about non-empty context stack notification, it should be
a warning because a lot of programs may be written without
cleaning contexts.
Also, if we do so, I think, there should be a way to recognize
whether there is a context on the stack top or not. %(el)if(n)
ctx do not provide such functionality now - they only perform
a test of context name.
I want to propose such syntax:
%ifctx *
Logged In: YES
user_id=804543
> [non-empty context stack at the end]
I don't really care whether it's a warning or
an error, as long as it does complain.
> [%(el)if(n)ctx should accept *]
I concur. I've just added that in my version.