[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of ras
From: |
Drew Adams |
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 |
> 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...]