Function: sqlind-adjust-comma

sqlind-adjust-comma is a natively compiled function defined in sql-indent.el.

Signature

(sqlind-adjust-comma SYNTAX BASE-INDENTATION)

Documentation

Lineup lines starting with a comma ',' to the word start.

Adjust BASE-INDENTATION so that the actual word is lined up. For example:

  SELECT col1
     , col2 -- ignore the comma and align the actual word.

Source Code

;; Defined in /nix/store/jxjf2h9nnkdqnn1w1mr0ag8bqng2rlrs-emacs-packages-deps/share/emacs/site-lisp/elpa/sql-indent-1.7/sql-indent.el
(defun sqlind-adjust-comma (_syntax base-indentation)
  "Lineup lines starting with a comma ',' to the word start.
Adjust BASE-INDENTATION so that the actual word is lined up.  For
example:

  SELECT col1
     ,   col2 -- ignore the comma and align the actual word."
  (save-excursion
    (back-to-indentation)
    (let ((ofs (if (looking-at ",\\s-*") (length (match-string 0)) 0)))
      (max 0 (- base-indentation ofs)))))