]> git.eshelyaron.com Git - emacs.git/commitdiff
ruby-ts-mode: Also don't reindent 'identifier' when inside ERROR
authorDmitry Gutov <dgutov@yandex.ru>
Thu, 9 Feb 2023 02:48:25 +0000 (04:48 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Thu, 9 Feb 2023 02:48:25 +0000 (04:48 +0200)
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Also don't reindent 'identifier' when inside ERROR.

lisp/progmodes/ruby-ts-mode.el

index 20ffb38fb8875d415489da4db4c0cc065f14ecef..01b0cd784a3f727240c6e3ced60494ab87ddd0f8 100644 (file)
@@ -571,7 +571,7 @@ a statement container is a node that matches
            ;; Incomplete buffer state, better not reindent (bug#61017).
            ((and (parent-is "ERROR")
                  (or (node-is ,ruby-ts--class-or-module-regex)
-                     (node-is "\\`def\\'")))
+                     (node-is "\\`\\(?:def\\|identifier\\)\\'")))
             no-indent 0)
 
            ;; if then else elseif notes: