Bryan Schofield wrote:
> This may not be appropriate for your euphoria language mode, but I've
> solved a complex indent/highlight problem by switching schemes in the
> middle. For example, on the "alternate" java (hkjava.emf) I switch
> to .indent.java-comm indent scheme when I detect the start of block
> comment, then later switch back to .indent.java.
> Perhaps you could create an extra .indent.euphoria-const indent scheme
> that handles the "public constant" and "public enum" case only.
> HTML mode does trickery with switching indent schemes, too.
> If memory serves, indent <scheme> "t" and indent <scheme> "x" are used.
> -- bryan
I looked at this last night running multiple schemes using a block
ending of "^\\s*$" (empty line). It worked for all of the given examples
when working in-line however failed for a restyle-buffer. The problem is
that there is not a good anchor to end the block. Using a blank line is
also very spurious as there are too many of them.
I know Jeremy tried anchoring on the ',', but given that this also
appears in bracketed expressions then this is not a good choice. Also it
fails for the construct which includes the comments.
It is quite a nasty construct and I was thinking you almost want
something like a indent 'c' (continue) which ends when it reaches a
blank line. ('c' in its current form will not work either).
Still thinking about it.
>> public constant
>> ABC = "abc",
>> DEF = "def",
>> XYZ = "xyz"
>> Now, to make matters worse:
>> public enum
>> --** User ID
>> --** User name (code used to login as)
>> --** The real name of the user
>> if 10 then
>> end if
>> Sort of got the , at the end of the line to indent properly, however I