GNU bug report logs - #73098
setopt float warning unexpected

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Sat, 7 Sep 2024 13:16:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #71 received at 73098 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: michael_heerdegen <at> web.de, 73098 <at> debbugs.gnu.org, stefankangas <at> gmail.com,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#73098: setopt float warning unexpected
Date: Fri, 13 Sep 2024 13:14:59 -0400
[Message part 1 (text/plain, inline)]
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 <eliz <at> gnu.org> wrote:

> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Fri, 13 Sep 2024 11:11:18 -0400
> > Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, Eli Zaretskii <
> eliz <at> gnu.org>,
> >       Michael Heerdegen <michael_heerdegen <at> web.de>,
> 73098 <at> 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.
>
[Message part 2 (text/html, inline)]

This bug report was last modified 342 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.