emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master c48ea7c: Check that feature exist in `sql-set-produ


From: Eli Zaretskii
Subject: [Emacs-diffs] master c48ea7c: Check that feature exist in `sql-set-product-feature' (Bug#30494).
Date: Sat, 12 Jan 2019 06:35:29 -0500 (EST)

branch: master
commit c48ea7c08c95185ddce266744a1959e0ce6b04e1
Author: Pierre Téchoueyres <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Check that feature exist in `sql-set-product-feature' (Bug#30494).
    
    * lisp/progmodes/sql.el (sql-set-product-feature): Add test for
    feature existence.
---
 lisp/progmodes/sql.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index ebde684..6ad2212 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -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))))
+      (progn
+       (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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]