emacs-diffs
[Top][All Lists]
Advanced

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

master 67e807d8970 1/2: ; Fix thinko in my last change


From: Stefan Kangas
Subject: master 67e807d8970 1/2: ; Fix thinko in my last change
Date: Wed, 2 Oct 2024 06:19:53 -0400 (EDT)

branch: master
commit 67e807d897077b7c982104b528e2504591214a29
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    ; Fix thinko in my last change
    
    * lisp/emacs-lisp/bytecomp.el (bytecomp--custom-declare): Fix thinko.
    * test/lisp/emacs-lisp/bytecomp-tests.el
    (bytecomp-test-defcustom-local): Update test.
---
 lisp/emacs-lisp/bytecomp.el            | 2 +-
 test/lisp/emacs-lisp/bytecomp-tests.el | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 72953502f51..29e7882c851 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -5472,7 +5472,7 @@ FORM is used to provide location, 
`bytecomp--cus-function' and
       ;; Check :local
       (when-let ((val (and (eq fun 'custom-declare-variable)
                            (plist-get keyword-args :local)))
-                 (_ (not (memq val '(t permanent permanent-only)))))
+                 (_ (not (member val '(t 'permanent 'permanent-only)))))
         (bytecomp--cus-warn form ":local keyword does not accept %S" val))))
 
   (byte-compile-normal-call form))
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el 
b/test/lisp/emacs-lisp/bytecomp-tests.el
index 69918e9c0c3..caece633459 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -1991,6 +1991,9 @@ EXPECTED-POINT BINDINGS (MODES \\='\\='(ruby-mode js-mode 
python-mode)) \
      (rx ":local keyword does not accept 'symbol") (dc 'symbol))
     (bytecomp--with-warning-test
      (rx ":local keyword does not accept \"string\"") (dc "string"))
+    (bytecomp--without-warning-test (dc t))
+    (bytecomp--without-warning-test (dc 'permanent))
+    (bytecomp--without-warning-test (dc 'permanent-only))
     ))
 
 (ert-deftest bytecomp-test-defface-spec ()



reply via email to

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