Function: sqlind-find-context

sqlind-find-context is a natively compiled function defined in sql-indent.el.

Signature

(sqlind-find-context SYNTAX-SYMBOL CONTEXT)

Documentation

Find SYNTAX-SYMBOL in the CONTEXT chain.

CONTEXT chain is a list of (SYNTAX-SYMBOL . ANCHOR), as returned by sqlind-syntax-of-line. The function finds the fist element which matches the specified syntax symbol and returns the list from that point.

See sqlind-indentation-syntax-symbols for the possible syntax symbols and their meaning.

Source Code

;; Defined in /nix/store/jxjf2h9nnkdqnn1w1mr0ag8bqng2rlrs-emacs-packages-deps/share/emacs/site-lisp/elpa/sql-indent-1.7/sql-indent.el
(defun sqlind-find-context (syntax-symbol context)
  "Find SYNTAX-SYMBOL in the CONTEXT chain.
CONTEXT chain is a list of (SYNTAX-SYMBOL . ANCHOR), as returned
by `sqlind-syntax-of-line'.  The function finds the fist element
which matches the specified syntax symbol and returns the list
from that point.

See `sqlind-indentation-syntax-symbols' for the possible syntax
symbols and their meaning."
  (cond ((null context)
         nil)
        ((eq syntax-symbol (sqlind-syntax-symbol context))
          context)
        (t
         (sqlind-find-context syntax-symbol (sqlind-outer-context context)))))