* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function): Don't
start heredoc inside a string or comment.
This commit is contained in:
parent
c1ea3abfde
commit
6dbafa3000
3 changed files with 11 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
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)))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue