all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: 65852@debbugs.gnu.org, Mauro Aranda <maurooaranda@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	[thread overview]
Message-ID: <865AB7EF-D175-4A6B-BD64-6C0EE0338D13@gmail.com> (raw)
In-Reply-To: <CADwFkmmPgXF+QFt63kg4dihSOUNpkTiznpL0wu5TdDVLGq_8yg@mail.gmail.com>

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.






  parent reply	other threads:[~2023-09-10 15:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-10 13:40 bug#65852: 30.0.50; image-auto-resize :type has choices in wrong order Mauro Aranda
2023-09-10 13:48 ` Mauro Aranda
2023-09-10 13:49 ` Stefan Kangas
2023-09-10 13:58   ` Mauro Aranda
2023-09-10 14:24     ` Stefan Kangas
2023-09-10 14:47       ` Mauro Aranda
2023-09-10 15:38         ` Stefan Kangas
2023-09-10 15:38       ` Mattias Engdegård [this message]
2023-09-12 14:42         ` Mattias Engdegård
2023-09-17 15:20           ` Mattias Engdegård
2023-09-17 21:53             ` Mauro Aranda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=865AB7EF-D175-4A6B-BD64-6C0EE0338D13@gmail.com \
    --to=mattias.engdegard@gmail.com \
    --cc=65852@debbugs.gnu.org \
    --cc=maurooaranda@gmail.com \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.