[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Long string literal bug in ruby-mode.el?

John Lam

5/2/2005 8:32:00 PM

That does the trick - thanks!
-John
http://www.iu...


________________________________

From: Jim Menard [mailto:jimm@io.com]
Sent: Mon 5/2/2005 4:21 PM
To: ruby-talk ML
Subject: Re: Long string literal bug in ruby-mode.el?



John Lam wrote:
> If I have a string like
>
> $def = <<-EOF
>
> ... big chunk of text
>
> EOF
>
> the syntax highlighting in ruby-mode breaks.
>
> Is there a known workaround for this issue?

I don't know. I don't think it's the size of the text, though. I think that
font-lock-mode gets confused by quotes in some circumstances, like when they
are inside regexes inside strings or something like that. I will often add a
comment just after the EOF that "closes" the quote it thinks is open. If a
single quote doesn't work, then I try a double quote.

$def = <<-EOF
...
EOF
# ' <-- un-confuse Emacs font-lock-mode

Jim
--
Jim Menard, jimm@io.com, http://www.io...
"Cheat sheet for the 21st century: Closed, bad. Open, good." -- Wired