1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

; 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.
This commit is contained in:
Stefan Kangas 2024-10-02 11:53:30 +02:00
parent 9e51815265
commit 67e807d897
2 changed files with 4 additions and 1 deletions

View File

@ -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))

View File

@ -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 ()