diff options
author | Stephen Leake <stephen_leake@stephe-leake.org> | 2018-12-13 14:39:02 -0800 |
---|---|---|
committer | Stephen Leake <stephen_leake@stephe-leake.org> | 2018-12-13 14:39:02 -0800 |
commit | 87bef630bf0f45e8da74e43ba614aa2292b296ef (patch) | |
tree | efdead3c0d7dd227bacbd4dfc5c1ff9b4d5c13c3 /lisp/progmodes/ruby-mode.el | |
parent | 4d3f7b77cc7dea072d2ecb9f137c2e497bc52da1 (diff) | |
parent | d08b75abe0f0cf9ade812b189c374809a2c7836e (diff) | |
download | emacs-87bef630bf0f45e8da74e43ba614aa2292b296ef.tar.gz emacs-87bef630bf0f45e8da74e43ba614aa2292b296ef.tar.bz2 emacs-87bef630bf0f45e8da74e43ba614aa2292b296ef.zip |
Merge commit 'd08b75abe0f0cf9ade812b189c374809a2c7836e'
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 2f68f004e7b..d60899cf182 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -517,6 +517,9 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." ((ruby-smie--opening-pipe-p) "opening-|") ((ruby-smie--closing-pipe-p) "closing-|") (t tok))) + ((string-match "\\`[^|]+|\\'" tok) + (forward-char -1) + (substring tok 0 -1)) ((and (equal tok "") (looking-at "\\\\\n")) (goto-char (match-end 0)) (ruby-smie--forward-token)) ((equal tok "do") @@ -559,6 +562,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." ((ruby-smie--opening-pipe-p) "opening-|") ((ruby-smie--closing-pipe-p) "closing-|") (t tok))) + ((string-match-p "\\`[^|]+|\\'" tok) "closing-|") ((string-match-p "\\`|[*&]\\'" tok) (forward-char 1) (substring tok 1)) |