Function: sqlind-lineup-into-nested-statement

sqlind-lineup-into-nested-statement is a natively compiled function defined in sql-indent.el.

Signature

(sqlind-lineup-into-nested-statement SYNTAX BASE-INDENTATION)

Documentation

Align the line to the first word inside a nested statement.

Return the column of the first non-whitespace char in a nested statement. For example:

  ( a,
       b, -- b is always aligned with 'a'
  )

This function only makes sense in a
'nested-statement-continuation SYTNAX indentation rule.

Source Code

;; Defined in /nix/store/jxjf2h9nnkdqnn1w1mr0ag8bqng2rlrs-emacs-packages-deps/share/emacs/site-lisp/elpa/sql-indent-1.7/sql-indent.el
(defun sqlind-lineup-into-nested-statement (syntax _base-indentation)
  "Align the line to the first word inside a nested statement.
Return the column of the first non-whitespace char in a nested
statement.  For example:

  (    a,
       b, -- b is always aligned with \\='a\\='
  )

This function only makes sense in a
\\='nested-statement-continuation SYTNAX indentation rule."
  (save-excursion
    (goto-char (sqlind-anchor-point syntax))
    (end-of-line)
    (let ((limit (point)))
      (goto-char (sqlind-anchor-point syntax))
      (forward-char 1)
      (sqlind-forward-syntactic-ws)
      (if (< (point) limit)
          (current-column)
        (progn
          (goto-char (sqlind-anchor-point syntax))
          (back-to-indentation)
          (+ (current-column) sqlind-basic-offset))))))