Commit 6dbafa30 authored by Dmitry Gutov's avatar Dmitry Gutov
Browse files

* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function): Don't

start heredoc inside a string or comment.
parent c1ea3abf
2013-06-30 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-syntax-propertize-function): Don't
start heredoc inside a string or comment.
2013-06-29 Eli Zaretskii <eliz@gnu.org>
* bindings.el (visual-order-cursor-movement): New defcustom.
......
......@@ -1422,7 +1422,9 @@ It will be properly highlighted even when the call omits parens.")
("^\\(=\\)begin\\_>" (1 "!"))
;; Handle here documents.
((concat ruby-here-doc-beg-re ".*\\(\n\\)")
(7 (unless (ruby-singleton-class-p (match-beginning 0))
(7 (unless (or (nth 8 (save-excursion
(syntax-ppss (match-beginning 0))))
(ruby-singleton-class-p (match-beginning 0)))
(put-text-property (match-beginning 7) (match-end 7)
'syntax-table (string-to-syntax "\""))
(ruby-syntax-propertize-heredoc end))))
......
......@@ -87,6 +87,9 @@ VALUES-PLIST is a list with alternating index and value elements."
(ert-deftest ruby-heredoc-highlights-interpolations ()
(ruby-assert-face "s = <<EOS\n #{foo}\nEOS" 15 font-lock-variable-name-face))
(ert-deftest ruby-no-heredoc-inside-quotes ()
(ruby-assert-state "\"<<\", \"\",\nfoo" 3 nil))
(ert-deftest ruby-deep-indent ()
(let ((ruby-deep-arglist nil)
(ruby-deep-indent-paren '(?\( ?\{ ?\[ ?\] t)))
......
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