From: Nobuyoshi Nakada Date: Fri, 20 Mar 2015 04:04:36 +0000 (+0200) Subject: Backport: ruby-mode: Expect regexp after { or | too X-Git-Tag: emacs-24.5-rc1~21 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a5d1f94;p=emacs.git Backport: 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. (cherry picked from commit dad0fc589c18dd95cf1ac77869a4530e2848c328) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 763a8eecfbd..0b568929b22 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-03-20 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 Michael Albinus * net/tramp.el (tramp-ssh-controlmaster-options): Make it a diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 3f560b9fee6..9c311cdbfb6 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1777,7 +1777,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. "\\|[?:] "