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 #33573 is a reply to message #33572] Thu, 16 January 2003 05:13 Go to previous messageGo to previous message
Carsten Dominik is currently offline  Carsten Dominik
Messages: 45
Registered: February 1998
Member
>>>> > "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.

This is pretty much the only bug in IDLWAVE where I have really no
idea how to fix it - as much as I would like to. The only viable
workaround is what you have already discovered, but that is ugly (I
think...).

You can restore the correct fontification at any time with

M-x font-lock-fontify-buffer

If you want to do this often, bind it to a key. I have:

(define-key global-map [f2] 'font-lock-fontify-buffer)

Hope this helps

- Carsten
[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:36:21 PDT 2025

Total time taken to generate the page: 0.00477 seconds