Function: sqlind-maybe-end-statement

sqlind-maybe-end-statement is a natively compiled function defined in sql-indent.el.

Signature

(sqlind-maybe-end-statement)

Documentation

Look for SQL end statements return t if found one.

If (point) is at an end statement, add it to the sqlind-end-stmt-stack and return t, otherwise return nil.

See also sqlind-beginning-of-block

Source Code

;; Defined in /nix/store/jxjf2h9nnkdqnn1w1mr0ag8bqng2rlrs-emacs-packages-deps/share/emacs/site-lisp/elpa/sql-indent-1.7/sql-indent.el
(defun sqlind-maybe-end-statement ()
  "Look for SQL end statements return t if found one.
If (point) is at an end statement, add it to the
`sqlind-end-stmt-stack' and return t, otherwise return nil.

See also `sqlind-beginning-of-block'"
  (when (looking-at sqlind-end-statement-regexp)
    (prog1 t                            ; make sure we return t
      (let ((kind (or (sqlind-match-string 1) ""))
	    (label (or (sqlind-match-string 2) "")))
	(push (list (point) (if (equal kind "") nil (intern kind)) label)
	      sqlind-end-stmt-stack)))))