Function: lua-is-continuing-statement-p
lua-is-continuing-statement-p is a byte-compiled function defined in
lua-mode.el.gz.
Signature
(lua-is-continuing-statement-p &optional PARSE-START)
Documentation
Return non-nil if PARSE-START should be indented as continuation line.
This true is when the line:
* Is continuing a statement itself
* Starts with a 1+ block-closer tokens, an top-most block opener is on a
continuation line.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/lua-mode.el.gz
(defun lua-is-continuing-statement-p (&optional parse-start)
"Return non-nil if PARSE-START should be indented as continuation line.
This true is when the line:
* Is continuing a statement itself
* Starts with a 1+ block-closer tokens, an top-most block opener is on a
continuation line."
(save-excursion
(when parse-start (goto-char parse-start))
;; If line starts with a series of closer tokens, whether or not the
;; line is a continuation line is decided by the opener line, e.g.
;;
;; x = foo +
;; long_function_name(
;; long_parameter_1,
;; long_parameter_2,
;; long_parameter_3,
;; ) + long_function_name2({
;; long_parameter_1,
;; long_parameter_2,
;; long_parameter_3,
;; })
;;
;; Final line, "})" is a continuation line, but it is decided by the
;; opener line, ") + long_function_name2({", which in its turn is
;; decided by the "long_function_name(" line, which is a
;; continuation line because the line before it ends with a binary
;; operator.
(cl-loop
;; Go to opener line
while (and (lua--goto-line-beginning-rightmost-closer)
(lua--backward-up-list-noerror))
;; If opener line is continuing, repeat. If opener line is not
;; Continuing, return nil.
always (lua-is-continuing-statement-p-1)
;; We get here if there was no opener to go to: check current line.
finally return (lua-is-continuing-statement-p-1))))