diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 44d8a2a82bd..ce507cfff9f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-06-18 Dmitry Gutov <dgutov@yandex.ru> + + * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): + Distinguish ternary operator tokens from slash symbol and slash + char literal. + 2013-06-18 Juanma Barranquero <lekktu@gmail.com> Convert symbol prettification into minor mode and global minor mode. 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" |