GNU bug report logs -
#60162
[PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error
Previous Next
Reported by: Philip Kaludercic <philipk <at> posteo.net>
Date: Sat, 17 Dec 2022 16:36:02 UTC
Severity: normal
Tags: patch
Done: Philip Kaludercic <philipk <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> 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...]
This bug report was last modified 2 years and 154 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.