diff options
| author | Dmitry Gutov | 2016-06-07 04:06:33 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2016-06-07 04:07:15 +0300 |
| commit | 973ce5a12352e1f88af335f8b57be2dcbe49c2b7 (patch) | |
| tree | 6b820921e1848144ed79ad55c5828f2a9ebd5d8f | |
| parent | 9d5ccebeba0506f7280662630f0ee85a52c8a327 (diff) | |
| download | emacs-973ce5a12352e1f88af335f8b57be2dcbe49c2b7.tar.gz emacs-973ce5a12352e1f88af335f8b57be2dcbe49c2b7.zip | |
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.el | 2 |
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." | |||
| 1151 | ((looking-at "<<") | 1151 | ((looking-at "<<") |
| 1152 | (cond | 1152 | (cond |
| 1153 | ((and (ruby-expr-beg 'heredoc) | 1153 | ((and (ruby-expr-beg 'heredoc) |
| 1154 | (looking-at "<<\\(-\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\(?:\\sw\\|\\s_\\)+\\)")) | 1154 | (looking-at "<<\\([-~]\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\(?:\\sw\\|\\s_\\)+\\)")) |
| 1155 | (setq re (regexp-quote (or (match-string 4) (match-string 2)))) | 1155 | (setq re (regexp-quote (or (match-string 4) (match-string 2)))) |
| 1156 | (if (match-beginning 1) (setq re (concat "\\s *" re))) | 1156 | (if (match-beginning 1) (setq re (concat "\\s *" re))) |
| 1157 | (let* ((id-end (goto-char (match-end 0))) | 1157 | (let* ((id-end (goto-char (match-end 0))) |