1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00

Clean up defcustom type quote check

* lisp/emacs-lisp/bytecomp.el
(byte-compile--suspicious-defcustom-choice): Rename to...
(byte-compile--defcustom-type-quoted): ...this and rewrite to make
more sense.  All callers updated.
(byte-compile-nogroup-warn): Better warning message.
* test/lisp/emacs-lisp/bytecomp-tests.el
(test-bytecomp-defgroup-choice): This never failed because it wasn't
actually a test.  Turn it into...
(bytecomp-test-defcustom-type-quoted): ...this, which is.
This commit is contained in:
Mattias Engdegård 2023-05-29 17:49:48 +02:00
parent f8a79c0055
commit 08291e6f17
2 changed files with 18 additions and 19 deletions

View file

@ -1799,11 +1799,11 @@ EXPECTED-POINT BINDINGS (MODES \\='\\='(ruby-mode js-mode python-mode)) \
(TEST-IN-COMMENTS t) (TEST-IN-STRINGS t) (TEST-IN-CODE t) \
(FIXTURE-FN \\='#\\='electric-pair-mode))" fill-column)))
(defun test-bytecomp-defgroup-choice ()
(should-not (byte-compile--suspicious-defcustom-choice 'integer))
(should-not (byte-compile--suspicious-defcustom-choice
(ert-deftest bytecomp-test-defcustom-type-quoted ()
(should-not (byte-compile--defcustom-type-quoted 'integer))
(should-not (byte-compile--defcustom-type-quoted
'(choice (const :tag "foo" bar))))
(should (byte-compile--suspicious-defcustom-choice
(should (byte-compile--defcustom-type-quoted
'(choice (const :tag "foo" 'bar)))))
(ert-deftest bytecomp-function-attributes ()