emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 a0ce569d3b7 2/4: ruby-toggle-block: Fix in ruby-ts-mode


From: Dmitry Gutov
Subject: emacs-29 a0ce569d3b7 2/4: ruby-toggle-block: Fix in ruby-ts-mode
Date: Thu, 19 Jan 2023 12:44:55 -0500 (EST)

branch: emacs-29
commit a0ce569d3b75eb98e945dbd443444fddfb779fde
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    ruby-toggle-block: Fix in ruby-ts-mode
    
    * lisp/progmodes/ruby-mode.el (ruby-toggle-block): Make it work
    with ruby-ts-mode.  ruby-forward-sexp checks ruby-use-smie.
---
 lisp/progmodes/ruby-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 2e8d335f151..2de7395f765 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1927,7 +1927,7 @@ If the result is do-end block, it will always be 
multiline."
     (end-of-line)
     (unless
         (if (and (re-search-backward "\\(?:[^#]\\)\\({\\)\\|\\(\\_<do\\_>\\)")
-                 (progn
+                 (let ((ruby-use-smie (and ruby-use-smie (consp 
smie-grammar))))
                    (goto-char (or (match-beginning 1) (match-beginning 2)))
                    (setq beg (point))
                    (with-suppressed-warnings ((obsolete ruby-forward-sexp))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]