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

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

[debbugs-tracker] bug#16079: closed (`ruby-forward-string' chokes on car


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#16079: closed (`ruby-forward-string' chokes on caret delimiters (PATCH))
Date: Mon, 09 Dec 2013 03:47:02 +0000

Your message dated Mon, 09 Dec 2013 05:46:17 +0200
with message-id <address@hidden>
and subject line Re: bug#16079: `ruby-forward-string' chokes on caret 
delimiters (PATCH)
has caused the debbugs.gnu.org bug report #16079,
regarding `ruby-forward-string' chokes on caret delimiters (PATCH)
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
16079: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16079
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: `ruby-forward-string' chokes on caret delimiters (PATCH) Date: Fri, 6 Dec 2013 11:33:21 -0600
`ruby-forward-string' is a function used to skip past strings in Ruby
mode. Ruby supports using any non-alpha character following a "%" to
delimit a string.  All of the following are valid Ruby syntax:

    - %[foo bar]
    - %/foo bar/
    - %%foo bar%
    - %^foo bar^

Currently ruby-mode can handle all of these except the last one, which
yields the following:

    #     Debugger entered--Lisp error: (invalid-regexp "Unmatched [ or [^")

The root of the problem is the construction of the following invalid
regexp: "[^]" (which is an incomplete negated character class).

This bug manifests itself by breaking `ruby-parse-region' in any
buffer containing a caret-delimited string.  This breaks indentation,
movement commands, and even keeps Emacs from building an Imenu.

I've attached a patch which resolves the issue.  Note that this patch
builds on the test suite for `ruby-forward-string' that I included in
issue #16078.
--
Cameron Desautels <address@hidden>

Attachment: fix-ruby-forward-string.diff
Description: Text document


--- End Message ---
--- Begin Message --- Subject: Re: bug#16079: `ruby-forward-string' chokes on caret delimiters (PATCH) Date: Mon, 09 Dec 2013 05:46:17 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
Cameron Desautels <address@hidden> writes:

> This bug manifests itself by breaking `ruby-parse-region' in any
> buffer containing a caret-delimited string.  This breaks indentation,
> movement commands, and even keeps Emacs from building an Imenu.

Thanks, I've applied the fix.

> I've attached a patch which resolves the issue.  Note that this patch
> builds on the test suite for `ruby-forward-string' that I included in
> issue #16078.

The tests are not included so far, let's continue discussing them in
#16078. Closing this one.


--- End Message ---

reply via email to

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