[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65852: 30.0.50; image-auto-resize :type has choices in wrong order
From: |
Mattias Engdegård |
Subject: |
bug#65852: 30.0.50; image-auto-resize :type has choices in wrong order |
Date: |
Sun, 10 Sep 2023 17:38:40 +0200 |
10 sep. 2023 kl. 16.24 skrev Stefan Kangas <stefankangas@gmail.com>:
> Mattias, do you think it would make sense to add some warnings for
> defcustom types to the byte-compiler? If so, I guess we'd want to limit
> ourselves to flagging obvious errors.
This appears to be about checking the specified type itself. Another frequently
made mistake is having an initial value that does not match the type.
Both of these cases should indeed ideally be caught at compile time but the
design of `defcustom` makes it impossible in general. In fact it's probably not
even possible to type-check the initial value at load time.
However we can check when the type and value are given as compile-time
constants, and we could postpone some of the linting to load time if it wasn't
possible earlier.
This is just macro work; I don't see any reason why the byte-compiler itself
should need to be involved directly.