bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37507: 26.3; Non-number value for `fill-column' causes wrong-type-ar


From: Eli Zaretskii
Subject: bug#37507: 26.3; Non-number value for `fill-column' causes wrong-type-arg error for `C-h f'
Date: Wed, 25 Sep 2019 09:37:23 +0300

> From: Noam Postavsky <npostavs@gmail.com>
> Date: Tue, 24 Sep 2019 15:53:15 -0400
> Cc: 37507@debbugs.gnu.org
> 
> Drew Adams <drew.adams@oracle.com> writes:
> 
> > `fill-column' is supposed to have an integer value > 0.
> >
> > But if it has a non-numeric value then other functions can barf, unless
> > they watch out for that.
> 
> Shouldn't users just not set it to a non-numeric value then?  I'm sure
> you can cause all sort of errors by setting things to invalid values.
> 
> > emacs -Q
> >
> > (setq fill-column nil)
> 
> Do you mean setq-default (otherwise I can't reproduce)?

I agree that this is a cockpit error.  Users who are prone to such
mistakes should use Customize to set values of variables.  Users who
use setq-default should know what they are doing.

It is unreasonable to request that we have an explicit test for valid
values in every place that references a variable.  Our protection is
that we signal an error, and that should IMO be good enough in cases
such as this one.

P.S.  This bug report came from a question on Reddit, where it
received the same responses.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]