From: Dmitry Gutov Date: Fri, 20 Mar 2015 04:05:02 +0000 (+0200) Subject: Backport: ruby-mode: Detect regexps after `!' X-Git-Tag: emacs-24.5-rc1~19 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1c4900d;p=emacs.git Backport: ruby-mode: Detect regexps after `!' Fixes: debbugs:19285 * lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Detect regexps after `!'. (cherry picked from commit 8854b9cf5283cac3e4a5a3726325a82b88c1fcb5) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eaf7c4653af..5c72fbdf291 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-03-20 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Detect + regexps after `!'. (Bug#19285) + 2015-03-20 Dmitry Gutov * progmodes/ruby-mode.el (ruby-font-lock-keywords): Use diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index e15105eb332..39c9ca0d771 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. "\\|[?:] "