branch: externals/compat
commit 3f2ec4de0f6fea6ec49554d2cb5cc92c7b472e2c
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>

    Fix setq-local
---
 compat-27.el    |  2 +-
 compat-tests.el | 18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/compat-27.el b/compat-27.el
index ba3384af78..433ab70cd9 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -376,7 +376,7 @@ where USER is a valid login name."
              (val (pop pairs)))
         (unless (symbolp sym)
           (error "Attempting to set a non-symbol: %s" (car pairs)))
-        (push `(set (make-local-variable ,sym) ,val)
+        (push `(set (make-local-variable ',sym) ,val)
               body)))
     (cons 'progn (nreverse body))))
 
diff --git a/compat-tests.el b/compat-tests.el
index 561b3e6ecd..5d82569bba 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -49,6 +49,15 @@
 (ert-deftest format-message ()
   (should-equal (format-message "a=%s b=%s" 1 2) "a=1 b=2"))
 
+(defvar compat-local-a nil)
+(defvar compat-local-b nil)
+(defvar compat-local-c nil)
+(ert-deftest setq-local ()
+  (compat-call setq-local compat-local-a 1 compat-local-b 2 compat-local-c 3)
+  (should-equal compat-local-a 1)
+  (should-equal compat-local-b 2)
+  (should-equal compat-local-c 3))
+
 (ert-deftest gensym ()
   (should (symbolp (gensym "compat")))
   (should (string-prefix-p "compat" (symbol-name (gensym 'compat))))
@@ -1702,14 +1711,5 @@
 ;;           (compat-sort (directory-files-recursively "." "make\\|copying") 
#'string<)
 ;;           '("./.github/workflows/makefile.yml" "./COPYING" "./Makefile"))))
 
-(defvar compat-local-a nil)
-(defvar compat-local-b nil)
-(defvar compat-local-c nil)
-(ert-deftest setq-local ()
-  (compat-setq-local compat-local-a 1 compat-local-b 2 compat-local-c 3)
-  (should-equal compat-local-a 1)
-  (should-equal compat-local-b 2)
-  (should-equal compat-local-c 3))
-
 (provide 'compat-tests)
 ;;; compat-tests.el ends here

Reply via email to