Function: sql-set-product-feature
sql-set-product-feature is a byte-compiled function defined in
sql.el.gz.
Signature
(sql-set-product-feature PRODUCT FEATURE NEWVALUE)
Documentation
Set FEATURE of database PRODUCT to NEWVALUE.
The PRODUCT must be a symbol which identifies the database
product. The product must have already exist on the product
list. See sql-add-product to add new products. The FEATURE
argument must be a plist keyword accepted by
sql-product-alist.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/sql.el.gz
(defun sql-set-product-feature (product feature newvalue)
"Set FEATURE of database PRODUCT to NEWVALUE.
The PRODUCT must be a symbol which identifies the database
product. The product must have already exist on the product
list. See `sql-add-product' to add new products. The FEATURE
argument must be a plist keyword accepted by
`sql-product-alist'."
(let* ((p (assoc product sql-product-alist)) ;; (PRODUCT :f v ...)
(v (plist-member (cdr p) feature))) ;; (:FEATURE value ...) or null
(if p
(if (member feature sql-indirect-features) ; is indirect
(if v
(if (car (cdr v))
(if (symbolp (car (cdr v)))
;; Indirect reference
(set (car (cdr v)) newvalue)
;; indirect is not a symbol
(error "The value of `%s' for `%s' is not a symbol" feature product))
;; keyword present, set the indirect variable name
(if (symbolp newvalue)
(if (cdr v)
(setf (car (cdr v)) newvalue)
(setf (cdr v) (list newvalue)))
(error "The indirect variable of `%s' for `%s' must be a symbol" feature product)))
;; not present; insert list
(setq v (list feature newvalue))
(setf (cdr (cdr v)) (cdr p))
(setf (cdr p) v))
;; Not an indirect feature
(if v
(if (cdr v)
(setf (car (cdr v)) newvalue)
(setf (cdr v) (list newvalue)))
;; no value; insert into the list
(setq v (list feature newvalue))
(setf (cdr (cdr v)) (cdr p))
(setf (cdr p) v)))
(error "`%s' is not a known product; use `sql-add-product' to add it first" product))))