* lisp/progmodes/ruby-mode.el (ruby-syntax-expansion-allowed-p):
Highlight expansions inside regexp literals.
This commit is contained in:
parent
2a157a5d33
commit
973d1e126c
3 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
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))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue