Revised language:

"Set VARIABLE/VALUE pairs with type warnings, and return the final VALUE.

This is like setq, but is meant for user options instead of
plain variables.  This means that setopt will execute any
custom-set form associated with VARIABLE, and will emit a
warning if VALUE is not of the type expected by the user option.

Example: If the user option is declared to accept a `float',
set the option to 2.0 rather than 2, which is considered an `integer'.

Despite the warning, the user option will still be set to VALUE."

On Fri, Sep 13, 2024 at 11:28 AM Eli Zaretskii <e...@gnu.org> wrote:

> > From: Ship Mints <shipmi...@gmail.com>
> > Date: Fri, 13 Sep 2024 11:11:18 -0400
> > Cc: Stefan Monnier <monn...@iro.umontreal.ca>, Eli Zaretskii <
> e...@gnu.org>,
> >       Michael Heerdegen <michael_heerde...@web.de>,
> 73...@debbugs.gnu.org
> >
> > Perhaps, some expanded advice in the docstring for setopt?
> >
> > "Set VARIABLE/VALUE pairs with enforced types, and return the final
> VALUE.
>
> "Enforce" is inaccurate, since a value that doesn't match :type just
> emits a warning (which can be shut up by the users, if they want), it
> doesn't signal an error.  And the variable is assigned the value event
> if the type doesn't match.
>
          • ... Eli Zaretskii
          • ... Bug reports for GNU Emacs, the Swiss army knife of text editors
          • ... Eli Zaretskii
          • ... Bug reports for GNU Emacs, the Swiss army knife of text editors
          • ... Bug reports for GNU Emacs, the Swiss army knife of text editors
          • ... Bug reports for GNU Emacs, the Swiss army knife of text editors
          • ... Eli Zaretskii
          • ... Stefan Kangas
          • ... Ship Mints
          • ... Eli Zaretskii
          • ... Ship Mints
          • ... Bug reports for GNU Emacs, the Swiss army knife of text editors
          • ... Bug reports for GNU Emacs, the Swiss army knife of text editors
          • ... Ship Mints
          • ... Ship Mints
  • bug#73098:... Andreas Schwab

Reply via email to