aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorDmitry Gutov2013-06-30 06:23:10 +0400
committerDmitry Gutov2013-06-30 06:23:10 +0400
commit6dbafa3000c0f39834f36adcd56d9332f7f1bc85 (patch)
treed3ba66f1550d9fd575450a4dc7c0e530f17d6e6a /lisp/progmodes
parentc1ea3abfdeb7d25a7ff90429dd71321eb890f4f4 (diff)
downloademacs-6dbafa3000c0f39834f36adcd56d9332f7f1bc85.tar.gz
emacs-6dbafa3000c0f39834f36adcd56d9332f7f1bc85.zip
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function): Don't
start heredoc inside a string or comment.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/ruby-mode.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index ab5634e5274..0292e40b986 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1422,7 +1422,9 @@ It will be properly highlighted even when the call omits parens.")
1422 ("^\\(=\\)begin\\_>" (1 "!")) 1422 ("^\\(=\\)begin\\_>" (1 "!"))
1423 ;; Handle here documents. 1423 ;; Handle here documents.
1424 ((concat ruby-here-doc-beg-re ".*\\(\n\\)") 1424 ((concat ruby-here-doc-beg-re ".*\\(\n\\)")
1425 (7 (unless (ruby-singleton-class-p (match-beginning 0)) 1425 (7 (unless (or (nth 8 (save-excursion
1426 (syntax-ppss (match-beginning 0))))
1427 (ruby-singleton-class-p (match-beginning 0)))
1426 (put-text-property (match-beginning 7) (match-end 7) 1428 (put-text-property (match-beginning 7) (match-end 7)
1427 'syntax-table (string-to-syntax "\"")) 1429 'syntax-table (string-to-syntax "\""))
1428 (ruby-syntax-propertize-heredoc end)))) 1430 (ruby-syntax-propertize-heredoc end))))