comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: xemacs syntax highlighting problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: xemacs syntax highlighting problem [message #33698 is a reply to message #33572] Thu, 16 January 2003 21:16 Go to previous messageGo to previous message
J. Fischer is currently offline  J. Fischer
Messages: 2
Registered: January 2003
Junior Member
Paul van Delst wrote:
> Why can't the fontification be based on a "context" buffer (dunno what the proper term
> would be). That is, you update syntax highlighting based on the immediate context of what
> surrounds the line in question? I have no idea how one would specify the extent of the
> context, though.

This wouldn't really help to improve efficiency.

> The efficiency issue Carsten mentions can be a real bugger. I use nedit and it checks the
> entire buffer every keystroke. Not usually a problem unless you have a lot of lines of
> code and you type in a string near the top of the file. The first use of ' causes all the
> following 's to be redefined and the character string syntax highlighting "flips". The
> closing ' in the line I'm typing corrects the situation but it can take a couple of
> seconds while nedit cogitates over the matter. Can be a real pain in the rear.

There is nothing wrong about checking the entire buffer. Actually, it is
the only way to get a efficient (almost) real-time and _proper_ syntax
highlighting.
This puts a higher responsibility on the patterns design, though. What
you describe is a badly designed patterns set. The patterns described by
a beginning and ending ' simply need an "error expression" to make it
stop. Confirm the NEdit documentation. You have to determine what can't
be or normally won't be (highlighting needn't be a syntax parser, it
shall only help to reduce errors) inside '' (for example if '' should be
contained in a single line, then you would give $ as error expression,
or does the language you are using have comments? Do they normally occur
inside '').

Hope you got the point.

Cheers,
Joerg
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: plotting particle data with halos?
Next Topic: DataMiner

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 14:20:19 PDT 2025

Total time taken to generate the page: 0.72152 seconds