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

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

[debbugs-tracker] bug#20026: closed ([PATCH] 24.4; regexp parse miss in


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#20026: closed ([PATCH] 24.4; regexp parse miss in ruby-mode)
Date: Sun, 08 Mar 2015 19:01:03 +0000

Your message dated Sun, 08 Mar 2015 21:00:22 +0200
with message-id <address@hidden>
and subject line Re: bug#20026: [PATCH] 24.4; regexp parse miss in ruby-mode
has caused the debbugs.gnu.org bug report #20026,
regarding [PATCH] 24.4; regexp parse miss in ruby-mode
to be marked as done.

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


-- 
20026: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20026
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] 24.4; regexp parse miss in ruby-mode Date: Sat, 07 Mar 2015 10:35:36 +0900 User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
ruby-mode misses a regexp just after an open brace ('{') or a vertical
bar ('|').  As the result, `forward-sexp` and regexp highlighting do not
work expectedly (or as a ruby interpreter interprets).

ex.

  tap { /'/ }

This "/'/" should be parsed as an regexp matches a single quote, but the
first operator is parsed as a division operator and the succeeding
single quote is parsed as a beginning of a string.

Same for `{|x| /'/}`.


--- lisp/progmodes/ruby-mode.el 2014-07-06 05:02:55.000000000 +0900
+++ lisp/progmodes/ruby-mode.el 2015-03-06 21:09:46.000000000 +0900
@@ -1777,7 +1777,7 @@
   (defvar ruby-syntax-before-regexp-re
     (concat
      ;; Special tokens that can't be followed by a division operator.
-     "\\(^\\|[[=(,~;<>]"
+     "\\(^\\|[[{|=(,~;<>]"
      ;; Distinguish ternary operator tokens.
      ;; FIXME: They don't really have to be separated with spaces.
      "\\|[?:] "


In GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, NS apple-appkit-1343.16)
 of 2014-12-24 on tenten-slave.macports.org
Windowing system distributor `Apple', version 10.3.1344
Configured using:
 `configure --prefix=/opt/local --with-ns --without-x --without-dbus
 CC=/usr/bin/clang 'CFLAGS=-pipe -Os -arch x86_64'
 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -arch
 x86_64' CPPFLAGS=-I/opt/local/include'

Important settings:
  locale-coding-system: utf-8-hfs

Major mode: Ruby



--- End Message ---
--- Begin Message --- Subject: Re: bug#20026: [PATCH] 24.4; regexp parse miss in ruby-mode Date: Sun, 08 Mar 2015 21:00:22 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0
Version: 25.1

On 03/07/2015 03:35 AM, Nobuyoshi Nakada wrote:
> ruby-mode misses a regexp just after an open brace ('{') or a vertical
> bar ('|').  As the result, `forward-sexp` and regexp highlighting do not
> work expectedly (or as a ruby interpreter interprets).

Pushed to master. Thanks.


--- End Message ---

reply via email to

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