diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2015-03-20 06:05:02 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2015-03-20 06:05:02 +0200 |
commit | 1c4900d953f11a09a9cbac6509ae659b27590a89 (patch) | |
tree | e768f939c59a6ce867301aecfb2ed141b14dda84 | |
parent | f74843a7f1ebc767cc67cda8981247c7e46404fd (diff) | |
download | emacs-1c4900d953f11a09a9cbac6509ae659b27590a89.tar.gz |
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)
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eaf7c4653af..5c72fbdf291 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2015-03-20 Dmitry Gutov <dgutov@yandex.ru> + * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Detect + regexps after `!'. (Bug#19285) + +2015-03-20 Dmitry Gutov <dgutov@yandex.ru> + * progmodes/ruby-mode.el (ruby-font-lock-keywords): Use `font-lock-constant-face' for nil, true and false. Highlight `self' as a keyword. (Bug#17733) 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. "\\|[?:] " |