unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Nobuyoshi Nakada <nobu@ruby-lang.org>
Cc: "Pål de Vibe" <pauldevibe@yahoo.no>, 5757@debbugs.gnu.org
Subject: bug#5757: String literal parse problem in ruby-mode
Date: Sat, 02 Apr 2011 20:50:11 -0400	[thread overview]
Message-ID: <87k4fcma4c.fsf_-_@stupidchicken.com> (raw)
In-Reply-To: <139083.40321.qm@web28507.mail.ukl.yahoo.com> ("Pål de Vibe"'s message of "Wed, 30 Mar 2011 23:08:33 +0100 (BST)")

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	other threads:[~2011-04-03  0:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 16:21 bug#5757: 23.1; String literal parse problem in ruby-mode Rhett Sutphin
2011-03-30 22:08 ` bug#5757: The line which causes the bug is 1185 Pål de Vibe
2011-04-03  0:50   ` Chong Yidong [this message]
2011-04-04 13:53     ` bug#5757: String literal parse problem in ruby-mode Stefan Monnier
2011-04-04 13:55       ` Pål de Vibe
2011-04-09 20:34       ` Chong Yidong
2011-04-12  3:16         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k4fcma4c.fsf_-_@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=5757@debbugs.gnu.org \
    --cc=nobu@ruby-lang.org \
    --cc=pauldevibe@yahoo.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).