Function: sql-get-product-feature
sql-get-product-feature is a byte-compiled function defined in
sql.el.gz.
Signature
(sql-get-product-feature PRODUCT FEATURE &optional FALLBACK NOT-INDIRECT)
Documentation
Lookup FEATURE associated with a SQL PRODUCT.
If the FEATURE is nil for PRODUCT, and FALLBACK is specified, then the FEATURE associated with the FALLBACK product is returned.
If the FEATURE is in the list sql-indirect-features, and the
NOT-INDIRECT parameter is not set, then the value of the symbol
stored in the connect alist is returned.
See sql-product-alist for a list of products and supported features.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/sql.el.gz
(defun sql-get-product-feature (product feature &optional fallback not-indirect)
"Lookup FEATURE associated with a SQL PRODUCT.
If the FEATURE is nil for PRODUCT, and FALLBACK is specified,
then the FEATURE associated with the FALLBACK product is
returned.
If the FEATURE is in the list `sql-indirect-features', and the
NOT-INDIRECT parameter is not set, then the value of the symbol
stored in the connect alist is returned.
See `sql-product-alist' for a list of products and supported features."
(let* ((p (assoc product sql-product-alist))
(v (plist-get (cdr p) feature)))
(if p
;; If no value and fallback, lookup feature for fallback
(if (and (not v)
fallback
(not (eq product fallback)))
(sql-get-product-feature fallback feature)
(if (and
(member feature sql-indirect-features)
(not not-indirect)
(symbolp v))
(symbol-value v)
v))
(error "`%s' is not a known product; use `sql-add-product' to add it first" product)
nil)))