diff options
| author | Dmitry Gutov | 2021-01-02 04:18:59 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2021-01-02 04:19:09 +0200 |
| commit | 0f561ee55348ff451600cc6027db5940ee14606f (patch) | |
| tree | aafe2217f2911077adc0f1c22fa13e46fda386db | |
| parent | 1c5208ba71156d225b54592e5e36788748f48ade (diff) | |
| download | emacs-0f561ee55348ff451600cc6027db5940ee14606f.tar.gz emacs-0f561ee55348ff451600cc6027db5940ee14606f.zip | |
ruby-smie-rules: Avoid one case of infinite recursion
* lisp/progmodes/ruby-mode.el (ruby-smie-rules):
Avoid one case of infinite recursion (bug#29107).
| -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 155a1609d3e..3effb6ed662 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -598,7 +598,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." | |||
| 598 | (`(:before . ,(or "(" "[" "{")) | 598 | (`(:before . ,(or "(" "[" "{")) |
| 599 | (cond | 599 | (cond |
| 600 | ((and (equal token "{") | 600 | ((and (equal token "{") |
| 601 | (not (smie-rule-prev-p "(" "{" "[" "," "=>" "=" "return" ";")) | 601 | (not (smie-rule-prev-p "(" "{" "[" "," "=>" "=" "return" ";" "do")) |
| 602 | (save-excursion | 602 | (save-excursion |
| 603 | (forward-comment -1) | 603 | (forward-comment -1) |
| 604 | (not (eq (preceding-char) ?:)))) | 604 | (not (eq (preceding-char) ?:)))) |