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 #33716 is a reply to message #33572] Thu, 16 January 2003 10:01 Go to previous message
s[1] is currently offline  s[1]
Messages: 21
Registered: December 2002
Junior Member
Thanks for the answers,

that explains a lot to me, I just had a look at idlde and vi to see
whether they are smarter, but they both don't even try to highlight the
keywords.
Interestingly enough, when I cat&paste several lines, like
TITLE='mytitle',$
GROUP_LEADER=myLeader,$
MBAR=myBar
all lines except the first one get updated.

The "context" to fix this problem would only be the previous line. I
always found the emacs lisp stuff too confusing, but naiv as I am I
would imagine that it can't be too hard to do it, or?

Best regards,

Sebastian

On Thu, 16 Jan 2003, Paul van Delst wrote:

> Carsten Dominik wrote:
>>
>>>> >>> "s" == s <Sebastian> writes:
>>
>> s> Hi all,
>> s> I have a little syntax highlighting problem with my xemacs IDLWAVE mode:
>> s> When using linebreaks like
>> s> wBase = WIDGET_BASE( /COLUMN, $
>> s> TITLE=('Mytitle'), $
>> s> GROUP_LEADER= myLeader)
>> s> the keywords in the continued lines (TITLE and GROUPLEADER) are
>> s> highlighted correctly when I open the file.
>> s> But once I edit something in these lines (e.g. change 'Mytitle' to
>> s> 'AnotherTitle'), the highlight goes away.
>> s> When I move the comma from the end of the lines to the start of the next
>> s> lines, like:
>> s> wBase = WIDGET_BASE( /COLUMN $
>> s> ,TITLE=('Mytitle') $
>> s> ,GROUP_LEADER= myLeader)
>> s> everything works fine.
>>
>> s> Any idea whats wrong and how I can fix it?
>>
>> It cannot be fixed. When editing, [X]Emacs looks only at the current
>> line to update syntax highlighting. This is mainly an efficiency
>> question - you don't want to scan the whole buffer after every
>> character typed.
>>
>> When there is no comma before the keyword, there is no way to tell (by
>> looking at the current line only) if it is a keyword or a variable
>> assignment.
>>
>> On the other hand, when opening a new file, the whole buffer is
>> fontified in one go, and in this case the engine notices
>> continuation lines and highlights correctly.
>
> 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.
>
> 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.
>
> paulv
>
> --
> Paul van Delst
> CIMSS @ NOAA/NCEP/EMC
> Ph: (301)763-8000 x7274
> Fax:(301)763-8545
>
[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: Wed Oct 08 17:51:12 PDT 2025

Total time taken to generate the page: 0.00379 seconds