emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/emacsql 7341144e49 201/427: Fix ordering bug in emacsql--v


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql 7341144e49 201/427: Fix ordering bug in emacsql--var-vars.
Date: Tue, 13 Dec 2022 02:59:41 -0500 (EST)

branch: elpa/emacsql
commit 7341144e492d0e0eb47a3aca82f66a604e55325e
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    Fix ordering bug in emacsql--var-vars.
---
 emacsql-compiler.el | 3 ++-
 emacsql-tests.el    | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/emacsql-compiler.el b/emacsql-compiler.el
index e97e566adc..28bd574e35 100644
--- a/emacsql-compiler.el
+++ b/emacsql-compiler.el
@@ -173,7 +173,8 @@ KIND should be :value or :identifier."
   (let ((var (emacsql-var thing)))
     (when (and var (symbolp var)) (setf thing var))
     (if (numberp var)
-        (prog1 "%s" (push (cons var kind) emacsql--vars))
+        (prog1 "%s"
+          (setf emacsql--vars (nconc emacsql--vars (list (cons var kind)))))
       (cl-case kind
         ((:identifier :value :vector) (emacsql-escape-format thing kind))
         (:auto (emacsql-escape-format
diff --git a/emacsql-tests.el b/emacsql-tests.el
index 27ca4731aa..bf36d02881 100644
--- a/emacsql-tests.el
+++ b/emacsql-tests.el
@@ -117,6 +117,9 @@
       ([a b c] :references ([a b] bar [aa bb] :on-delete :cascade))] '()
       (concat "CREATE TABLE foo (a NONE, b NONE, c NONE, FOREIGN KEY (a, b) "
               "REFERENCES bar (aa, bb) ON DELETE CASCADE);"))
+    ;; Template
+    ([:create-table $1 $2] '(foo [alpha beta delta])
+     "CREATE TABLE foo (alpha NONE, beta NONE, delta NONE);")
     ;; Drop table
     ([:drop-table $1] '(foo)
      "DROP TABLE foo;")))



reply via email to

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