summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2016-06-07 04:06:33 +0300
committerDmitry Gutov <dgutov@yandex.ru>2016-06-07 04:07:15 +0300
commit973ce5a12352e1f88af335f8b57be2dcbe49c2b7 (patch)
tree6b820921e1848144ed79ad55c5828f2a9ebd5d8f
parent9d5ccebeba0506f7280662630f0ee85a52c8a327 (diff)
downloademacs-973ce5a12352e1f88af335f8b57be2dcbe49c2b7.tar.gz
Improve squiggly heredoc support in non-SMIE Ruby mode
* lisp/progmodes/ruby-mode.el (ruby-parse-partial): Support squiggly heredocs here, too (port from upstream).
-rw-r--r--lisp/progmodes/ruby-mode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index cd3b04de712..d75edbc84ef 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1151,7 +1151,7 @@ delimiter."
((looking-at "<<")
(cond
((and (ruby-expr-beg 'heredoc)
- (looking-at "<<\\(-\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\(?:\\sw\\|\\s_\\)+\\)"))
+ (looking-at "<<\\([-~]\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\(?:\\sw\\|\\s_\\)+\\)"))
(setq re (regexp-quote (or (match-string 4) (match-string 2))))
(if (match-beginning 1) (setq re (concat "\\s *" re)))
(let* ((id-end (goto-char (match-end 0)))