Skip to content

Commit

Permalink
lua-is-continuing-statement-p-1: fix missing save-excursion on branch
Browse files Browse the repository at this point in the history
  • Loading branch information
immerrr committed Nov 9, 2020
1 parent 350acce commit b043ca4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lua-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1415,9 +1415,9 @@ The criteria for a continuing statement are:
(save-excursion (setq prev-line (lua-forward-line-skip-blanks 'back)))
(and prev-line
(not (lua--continuation-breaking-line-p))
(or
;; Binary operator or keyword that implies continuation.
(save-excursion
(save-excursion
(or
;; Binary operator or keyword that implies continuation.
(and (setq continuation-pos
(or (lua-first-token-continues-p)
(save-excursion (and (goto-char prev-line)
Expand All @@ -1433,10 +1433,10 @@ The criteria for a continuing statement are:
;; - inside braces if it is a comma
(and (eq (char-after continuation-pos) ?,)
(equal parent-block-opener "{")))))
continuation-pos))
;; "for" expressions (until the next do) imply continuation.
(when (string-equal (car-safe (lua--backward-up-list-noerror)) "for")
(point))))))
continuation-pos)
;; "for" expressions (until the next do) imply continuation.
(when (string-equal (car-safe (lua--backward-up-list-noerror)) "for")
(point)))))))



Expand Down

0 comments on commit b043ca4

Please sign in to comment.