ruby-mode: Detect regexps after `!'

Fixes: debbugs:19285

* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Detect
regexps after `!'.
This commit is contained in:
Dmitry Gutov 2015-03-09 05:53:58 +02:00
parent 4fab7badf5
commit 8854b9cf52
2 changed files with 3 additions and 1 deletions

View file

@ -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 <eliz@gnu.org>

View file

@ -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.
"\\|[?:] "