bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5757: String literal parse problem in ruby-mode


From: Chong Yidong
Subject: bug#5757: String literal parse problem in ruby-mode
Date: Sat, 02 Apr 2011 20:50:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Nakada-san,

Could you help review Pål de Vibe's proposed fix to the following
problem in Emacs ruby-mode?  Thanks.


Pål de Vibe <pauldevibe@yahoo.no> writes:

>> ruby-mode will misunderstand a ruby double-quoted string literal which
>> contains a single quote and ends with a question mark.  It thinks that
>> the string literal is unterminated, which contaminates the syntax
>> highlighting for the remainder of the buffer.
>>
>> Example ruby code which will demonstrate the problem:
>>
>> ["Is 'this' a string?"], [:something, :else]
>>
>> If there's anything between the question mark and the terminating
>> double-quote, the string will be correctly interpreted.
>
> Line 1185:
> ("\\(^\\|[^\\\\]\\)\\(\\\\\\\\\\)*[?$]\\([#\"'`]\\)" 3 (1 . nil))
>
> A workaround (with, to me, uknown consequences) is to remove the
> question mark from the line, like this:
>
> ("\\(^\\|[^\\\\]\\)\\(\\\\\\\\\\)*[$]\\([#\"'`]\\)" 3 (1 . nil))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]