summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ruby-mode.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2020-08-22 16:21:50 +0300
committerDmitry Gutov <dgutov@yandex.ru>2020-08-22 16:26:47 +0300
commit2725254ab5463124388b1278e1cf0fdfafa0ba96 (patch)
tree7ad872b11a69947197a86fef117f2400dce877df /lisp/progmodes/ruby-mode.el
parent0aa4647f9cc53f3ded2c1bdea3d9f44962d318c0 (diff)
downloademacs-2725254ab5463124388b1278e1cf0fdfafa0ba96.tar.gz
emacs-2725254ab5463124388b1278e1cf0fdfafa0ba96.tar.bz2
emacs-2725254ab5463124388b1278e1cf0fdfafa0ba96.zip
Make ruby-parse-partial more stable
* lisp/progmodes/ruby-mode.el (ruby-parse-partial): Don't call ruby-deep-indent-paren-p (bug#42841).
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r--lisp/progmodes/ruby-mode.el16
1 files changed, 3 insertions, 13 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index e16225c7fa9..831acf87bf0 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -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)