Commit 973d1e12 authored by Dmitry Gutov's avatar Dmitry Gutov

* lisp/progmodes/ruby-mode.el (ruby-syntax-expansion-allowed-p):

Highlight expansions inside regexp literals.
parent 2a157a5d
2013-05-31 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-syntax-expansion-allowed-p):
Highlight expansions inside regexp literals.
2013-05-31 Glenn Morris <rgm@gnu.org>
* obsolete/sym-comp.el (symbol-complete):
......
......@@ -1513,7 +1513,7 @@ It will be properly highlighted even when the call omits parens.")
"Return non-nil if expression expansion is allowed."
(let ((term (nth 3 parse-state)))
(cond
((memq term '(?\" ?` ?\n)))
((memq term '(?\" ?` ?\n ?/)))
((eq term t)
(save-match-data
(save-excursion
......
......@@ -112,6 +112,9 @@ VALUES-PLIST is a list with alternating index and value elements."
(ert-deftest ruby-regexp-starts-after-string ()
(ruby-assert-state "'(/', /\d+/" 3 ?/ 8))
(ert-deftest ruby-regexp-interpolation-is-highlighted ()
(ruby-assert-face "/#{foobs}/" 4 font-lock-variable-name-face))
(ert-deftest ruby-regexp-skips-over-interpolation ()
(ruby-assert-state "/#{foobs.join('/')}/" 3 nil))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment