Rev 4194 contains two, no three, major improvements to Leo's Qt colorizer: 1. Leo correctly colors nodes containing more than one @language directives.
As with @color directives, only unambiguous @language directives affect the default coloring of descendant nodes. 2. Leo ignores (and does not color) @language directive for unknown languages. 3. In effect, Leo completely recolors nodes when you change @language directives by typing. Once again, these are changes that really should have been made somewhere between three and eight years ago :-) These changes are completely benign: A. They are confined to qtGui.py. They have absolutely no effect on Leo's core. In particular, none of the directives scanning functions in leoGlobals.py changed, which was essential for Leo's stability. B. I am absolutely certain that these changes will have no effect whatsoever on performance. The only changes: Change 1: A hack in init_mode to ignore @language directives for unknown languages. Change 2: A tiny change in match_at_language to suppress coloring of the @language directive itself for unknown languages. Change 3: scanColorDirectives now calls the new findLanguageDirectives method to scan the entire body text for other @language directives. However, this will have *no* effect on performance because i) scanColorDirectives is called infrequently and ii) scanColorDirectives calls findLanguageDirectives *only* if node's body text is known (using existing code) to have at least one @language directive and anyway iii) findLanguageDirectives itself is very fast. Note in particular that the fundamental colorizing loop and its helpers were not changed in *any* way. Edward -- 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.
