From dad0fc589c18dd95cf1ac77869a4530e2848c328 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 8 Mar 2015 20:57:29 +0200 Subject: [PATCH] ruby-mode: Expect regexp after { or | too Fixes: debbugs:20026 * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Expect beginning of regexp also after open brace or vertical bar. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/ruby-mode.el | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b277c7c518..60f5dfcdb7c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-03-08 Nobuyoshi Nakada + + * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Expect + beginning of regexp also after open brace or vertical bar. + (Bug#20026) + 2015-03-07 Stefan Monnier * battery.el (battery-echo-area-format): Simplify default. diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index d1e42ca3443..4307109f654 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1817,7 +1817,7 @@ It will be properly highlighted even when the call omits parens.") (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. "\\|[?:] " -- 2.39.2