From 8854b9cf5283cac3e4a5a3726325a82b88c1fcb5 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Mon, 9 Mar 2015 05:53:58 +0200 Subject: [PATCH] ruby-mode: Detect regexps after `!' Fixes: debbugs:19285 * lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Detect regexps after `!'. --- lisp/ChangeLog | 2 ++ lisp/progmodes/ruby-mode.el | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e1842973ac..b284ef16ea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,8 @@ * progmodes/ruby-mode.el (ruby-font-lock-keywords): Don't consider `=' a part of symbol when followed by `>'. (Bug#18644) + (ruby-syntax-before-regexp-re): Detect regexps after `!'. + (Bug#19285) 2015-03-09 Eli Zaretskii diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 06b1fcf172..060bc847eb 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