bug#81372: 30.2; make setopt warn on type mismatch in more cases

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
>> Here's my current suggestion.  It includes FIXME comments in
>> `setopt--set-local` about which I'd like to have Stephane's opinion, tho
>> this shouldn't stop us from moving with the `setopt--set` part.

Pushed to `master`, closing.

> I think the reason this was implemented for set-local only was due to
> file/directory variables being less intentional than someone's
> configuration in which setopt would be under their full control.

Agreed, but I think this suggests it should be moved outside of
`setopt-local` itself so it applies only to the file/dir-local
variable settings.

> We could improve and share type checking code for both setopt and
> setopt-local and rename the custom variable setopt-local-type-mismatch to
> something like setopt-type-mismatch or create two variables one for each
> context or otherwise have it be a cons global . local treatment like (setq
> setopt-type-mismatch (cons 'accept 'discard)).

That's another option.  But I think this kind of control is weird when
`setopt(-local)` is called from ELisp.


=== Stefan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.