> > Overriding the rulesDict of php_main (from
> > rulesDict1 to rulesDict4) means that for text/code following a closing
> > PHP tag (?>), e.g. HTML, the colorizer WILL still attempt to color it
> > as if it is PHP, unless the Leo user will put a specific @language
> > directive following the closing PHP tag.

After a more careful examination of php.py, I take it back. rulesDict1
switches to php_php on a range from <? to ?>, so the ending tag is
already part of the rule in php_main. This means that a much much more
complex change is required in the rules in order to take ?> into
account in php_php. I do not think it is worth the effort.

Anyway, I can definitely leave with using @language when I am
practically switching language, and I do not need Leo to guess what
language I switched to. I would even say this is some of the power
that Leo offers.

> At present, this does not seem to be satisfactory. The php test node
> in test.leo is not colored properly.

I think this is because you have accidentally commented out
rulesDict1.

> it would be great if just changing php.py would suffice.

It seems that the hack is enough for PHP for now.

As a side note, PHP6 is on its way, and it might be that an update
from jEdit updated XML files will be desired, but we can leave this
for the time to come :)

Gil
-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.


Reply via email to