diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2013-06-19 02:17:56 +0400 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2013-06-19 02:17:56 +0400 |
commit | d1bbba4fa5de77c3bdfb01901b697ead748a4ba6 (patch) | |
tree | 6df0d8ba9fae9ff9940f523565d4260c4d5a7c92 /lisp/progmodes/ruby-mode.el | |
parent | 14dd22d2cedad0e1babcce0fea868a0c01294fa2 (diff) | |
download | emacs-d1bbba4fa5de77c3bdfb01901b697ead748a4ba6.tar.gz emacs-d1bbba4fa5de77c3bdfb01901b697ead748a4ba6.tar.bz2 emacs-d1bbba4fa5de77c3bdfb01901b697ead748a4ba6.zip |
* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re):
Distinguish ternary operator tokens from slash symbol and slash
char literal.
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index fa4efe49b7b..8a1548bc940 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1368,7 +1368,10 @@ 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. + "\\|[?:] " ;; Control flow keywords and operators following bol or whitespace. "\\|\\(?:^\\|\\s \\)" (regexp-opt '("if" "elsif" "unless" "while" "until" "when" "and" |