bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63410: 30.0.50; [FR] Optionally allow defcustom to check type for st


From: Ruijie Yu
Subject: bug#63410: 30.0.50; [FR] Optionally allow defcustom to check type for standard value
Date: Thu, 11 May 2023 22:08:20 +0800
User-agent: mu4e 1.11.3; emacs 30.0.50

Ruijie Yu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 
<bug-gnu-emacs@gnu.org> writes:

> In that case, I had my semi-parallel second proposal: provide a command
> that checks for a group of variables and see if types of all variables
> within the group (or its subgroups) are correct.

Regarding the second proposal: I have quickly hacked together a
functional example of type checking, see the attachment.  If we think
this should be integrated into Emacs, I can make some minor edits and
propose a patch.  In that case, I would probably put the functions
somewhere in cus-edit.el or custom.el.

Note that at the moment it depends on the internal function
`custom--standard-value', which is a one-line function accessing a
property of the symbol.

Attachment: cfg-check-defcustom.el
Description: Text document

Also, note that I added the symbol into the warning text because the
goal of this command is to mass-check an entire group, whereas `setopt'
did not mention the variable symbol name.  Not sure if `setopt' should
show the symbol in trouble, but I understand if we don't want to do
that.

-- 
Best,


RY

reply via email to

[Prev in Thread] Current Thread [Next in Thread]