Commit c48ea7c0 authored by Pierre Téchoueyres's avatar Pierre Téchoueyres Committed by Eli Zaretskii

Check that feature exist in `sql-set-product-feature' (Bug#30494).

* lisp/progmodes/sql.el (sql-set-product-feature): Add test for
feature existence.
parent 8fe21b03
Pipeline #514 passed with stage
in 46 minutes and 48 seconds
......@@ -2668,13 +2668,17 @@ argument must be a plist keyword accepted by
(let* ((p (assoc product sql-product-alist))
(v (plist-get (cdr p) feature)))
(if p
(if (and p v)
(if (and
(member feature sql-indirect-features)
(symbolp v))
(set v newvalue)
(setcdr p (plist-put (cdr p) feature newvalue)))
(error "`%s' is not a known product; use `sql-add-product' to add it first." product))))
(when (null p)
(error "`%s' is not a known product; use `sql-add-product' to add it first." product))
(when (null v)
(error "`%s' is not a known feature for `%s'; use `sql-add-product' to add it first." feature product))))))
(defun sql-get-product-feature (product feature &optional fallback not-indirect)
"Lookup FEATURE associated with a SQL PRODUCT.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment