Function: js--chained-expression-p
js--chained-expression-p is a byte-compiled function defined in
js.el.gz.
Signature
(js--chained-expression-p)
Documentation
A helper for js--proper-indentation that handles chained expressions.
A chained expression is when the current line starts with '.' and the
previous line also has a '.' expression.
This function returns the indentation for the current line if it is
a chained expression line; otherwise nil.
This should only be called while point is at the start of the line's content,
as determined by back-to-indentation.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
(defun js--chained-expression-p ()
"A helper for js--proper-indentation that handles chained expressions.
A chained expression is when the current line starts with '.' and the
previous line also has a '.' expression.
This function returns the indentation for the current line if it is
a chained expression line; otherwise nil.
This should only be called while point is at the start of the line's content,
as determined by `back-to-indentation'."
(when js-chain-indent
(save-excursion
(when (and (eq (char-after) ?.)
(js--continued-expression-p)
(js--find-newline-backward)
(js--skip-terms-backward))
(current-column)))))