Re: IDLWAVE fontlock / fontify weirdness in Xemacs [message #22302 is a reply to message #22299] |
Thu, 02 November 2000 07:37   |
John-David T. Smith
Messages: 384 Registered: January 2000
|
Senior Member |
|
|
Martin Schultz wrote:
>
> jrigler@Colorado.EDU wrote:
>>
>> I have Xemacs 21.1.12 (default with RH Linux 7.0 Respin), and updated
>> all of my packages to the most recent versions as of 10/31/00 (which
>> means IDLWAVE 1.22...or a modified version 4.5 I assume).
>>
>> The problem I'm experiencing is in the fontification. For whatever
>> reason, all of a suddent every time I start a new line, or even modify
>> an old line for that matter, it all turns green (the color for
>> strings). this only really happens after a certain block in the code.
>> The possibly offending code (which works, and I see no syntax problems
>> with it) follows. Any ideas?
>>
>> ; Convert MJD to a YYYYMMDD (see - http://bowie.gsfc.nasa.gov/time/)
>> caldat,date_beg+2400000.5,month_beg,day_beg,year_beg
>> caldat,date_end+2400000.5,month_end,day_end,year_end
>>
>> month_beg=string(month_beg,format='(i2.2)')
>> day_beg=string(day_beg,format='(i2.2)')
>> year_beg=string(year_beg,format='(i4.4)')
>>
>> To clarify a little more, what happens is that I can type anything
>> before the line with the first "format" statement, and it works
>> perfectly. If I add, or modify anything after the "format" statement,
>> the whole line becomes green, as if IDLWAVE thought it were a string.
>>
>> I really don't like the IDLDE, so I sure hope there is a solution to
>> this.
>>
>> Thanks,
>>
>> Josh
>>
>> Sent via Deja.com http://www.deja.com/
>> Before you buy.
>
> yes, I have seen a similar thing already in earlier versions of
> idlwave (presumably 3.12). I never succeeded in tracking down the part
> of the code that caused it but haven't tried to hard either.
> Interestingly, it sometimes appeared to work better once I exited
> xemacs and restarted again. Then again: sometimes this didn't help
> either.
>
> Cheers,
> Martin
>
> PS: I know, this was a terrible bug report ;-) But perhaps it helps to
> know that it occured in earlier versions...
I presume Carsten will weigh in authoritatively on this question, but I
just wanted to make sure you're using the latest IDLWAVE... version 4.5,
available at http://www.strw.leidenuniv.nl/~dominik/Tools/idlwave/. I
presume you have your font-lock fontifier working, or you wouldn't know
to complain, but make sure you've set:
(global-font-lock-mode 1)
or some such in your .emacs.
One other gotcha: if you've extracted this code fragment from a larger
file, the details of what's in that file are important. IDLWAVE
fontifies based on the entire buffer, not line by line. An example
screw-up:
a='this is a string
b=a+c ; this isn't fontified correctly
Here the closing quote is forgotten. IDLWAVE notices and tells you
about it after you leave the string, but if you leave it or load in a
file with this error, you'll see the fontification past there looks like
one big string, until you start typing and IDLWAVE does more local
fontification. This is quite useful, since it gives you immediate
visual clues as to where the error occurs.
JD
--
J.D. Smith | WORK: (607) 255-6263
Cornell Dept. of Astronomy | (607) 255-5842
304 Space Sciences Bldg. | FAX: (607) 255-5875
Ithaca, NY 14853 |
|
|
|