1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

Make ruby-parse-partial more stable

* lisp/progmodes/ruby-mode.el (ruby-parse-partial):
Don't call ruby-deep-indent-paren-p (bug#42841).
This commit is contained in:
Dmitry Gutov 2020-08-22 16:21:50 +03:00
parent 0aa4647f9c
commit 2725254ab5

View file

@ -1060,22 +1060,12 @@ delimiter."
(goto-char (point))
)
((looking-at "[\\[{(]")
(let ((deep (ruby-deep-indent-paren-p (char-after))))
(if (and deep (or (not (eq (char-after) ?\{)) (ruby-expr-beg)))
(progn
(and (eq deep 'space) (looking-at ".\\s +[^# \t\n]")
(setq pnt (1- (match-end 0))))
(setq nest (cons (cons (char-after (point)) pnt) nest))
(setq pcol (cons (cons pnt depth) pcol))
(setq depth 0))
(setq nest (cons (cons (char-after (point)) pnt) nest))
(setq depth (1+ depth))))
(setq nest (cons (cons (char-after (point)) pnt) nest))
(setq depth (1+ depth))
(goto-char pnt)
)
((looking-at "[])}]")
(if (ruby-deep-indent-paren-p (matching-paren (char-after)))
(setq depth (cdr (car pcol)) pcol (cdr pcol))
(setq depth (1- depth)))
(setq depth (1- depth))
(setq nest (cdr nest))
(goto-char pnt))
((looking-at ruby-block-end-re)