GNU bug report logs - #63410
30.0.50; [FR] Optionally allow defcustom to check type for standard value

Previous Next

Package: emacs;

Reported by: Ruijie Yu <ruijie <at> netyu.xyz>

Date: Wed, 10 May 2023 05:37:01 UTC

Severity: wishlist

Found in version 30.0.50

Full log


Message #14 received at 63410 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ruijie Yu <ruijie <at> netyu.xyz>
Cc: 63410 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#63410: 30.0.50;
 [FR] Optionally allow defcustom to check type for standard value
Date: Wed, 10 May 2023 18:40:19 +0300
> Cc: "63410 <at> debbugs.gnu.org" <63410 <at> debbugs.gnu.org>
> Date: Wed, 10 May 2023 22:51:14 +0800
> From:  Ruijie Yu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> My request is that Emacs should (optionally, maybe behind a defcustom,
> or configure, or cli flag, etc.) warn you warn a defcustom's standard
> value does not match its declared type.

Warn you at what time?  When defcustom is byte-compiled? when it is
evaluated at run time? when the user says "M-x set-variable"?
something else?

> Since a similar warning is already in place for `setopt', I don't
> think it is farfetched to request `defcustom' to follow suit.

setopt says it when you invoke it.  But setopt is designed to be
called as a function at run time, whereas defcustom isn't.




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

Previous Next


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