From: Drew Adams <drew.adams@oracle.com>
To: Philip Kaludercic <philipk@posteo.net>,
"60162@debbugs.gnu.org" <60162@debbugs.gnu.org>
Subject: bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error
Date: Sat, 17 Dec 2022 17:40:37 +0000 [thread overview]
Message-ID: <SJ0PR10MB5488B4F9B7A48E7F22372709F3E79@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87a63mvvib.fsf@posteo.net>
> Setopt checks the :type of a user option, and raises an user-error if
> the value doesn't match the type. This can be annoying during
> initialisation, because minor mistakes interrupt everything and you are
> let with a partially loaded configuration.
>
> I'd propose replacing the `user-error' with a `warn', that would still
> indicate mistakes, but continue loading the init.el.
I don't have Emacs 29, so I don't know what
`setopt' is/does. But if it does more or less
what `customize-set-variable` does then:
Can `setopt' be used interactively?
`customize-set-variable' raises an error when
used interactively, if the type doesn't match.
It does that in the `interactive' form, with
`custom-prompt-variable'.
But `customize-set-variable' _doesn't_ raise
an error when called from Lisp with a type
mismatch (the type check is done only in
`interactive').
Since you mention "initialisation" I guess
this is about calls from Lisp.
___
[If `setopt' does what `customize-set-variable'
does, why was it added? If not, what's its
particular use case? Just curious; I can always
wait to find out what Emacs 29 presents...]
next prev parent reply other threads:[~2022-12-17 17:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-17 16:35 bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Philip Kaludercic
2022-12-17 17:40 ` Drew Adams [this message]
2022-12-17 18:00 ` Philip Kaludercic
2022-12-17 20:53 ` Drew Adams
2022-12-17 22:19 ` Philip Kaludercic
2022-12-18 11:28 ` Eli Zaretskii
2022-12-18 11:46 ` Philip Kaludercic
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR10MB5488B4F9B7A48E7F22372709F3E79@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=60162@debbugs.gnu.org \
--cc=philipk@posteo.net \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).