> Perhaps you add in a hook to allow a function to specified as the last
> argument in an indent rule. This function would return an indicator on
> whether the indent rule should actually be applied. The function could
> be passed the line number and do whatever language-specific analysis
> is required.
> indent .indent.java c "if.*)\\s*$" t java-check-if
> define-macro java-check-if
> ; @1 = line number
> ; ...
> set-variable $result true
I think you are right.
I did try and prototype this type of schema about a year ago and got into
a real mess because of problems with the macro context (i.e. you are in a
macro that then calls back into native and then want to come out and run a
macro again) - anyway I ran out of time doing some other stuff. I do
believe that this is the way to go but have not found enough time to
follow it through to a conclusion and get it working.
The only problem with this type of scheme is if you mess up in your macro
the editor will die a horrible death - error recovery is likely to be