GNU bug report logs - #65852
30.0.50; image-auto-resize :type has choices in wrong order

Previous Next

Package: emacs;

Reported by: Mauro Aranda <maurooaranda <at> gmail.com>

Date: Sun, 10 Sep 2023 13:42:02 UTC

Severity: normal

Merged with 2591

Found in version 30.0.50

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 65852 <at> debbugs.gnu.org, Mauro Aranda <maurooaranda <at> gmail.com>
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 <at> 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.





This bug report was last modified 1 year and 225 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.