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

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

bug#24706: 26.0.50; Minor mode functions should do strict argument type


From: Eli Zaretskii
Subject: bug#24706: 26.0.50; Minor mode functions should do strict argument type checking
Date: Sun, 16 Oct 2016 21:01:14 +0300

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Sun, 16 Oct 2016 12:31:51 -0400
> Cc: 24706@debbugs.gnu.org, Philipp Stephani <p.stephani2@gmail.com>
> 
> > No, it does not suggest that.  But to be clearer, it should
> > probably explicitly address the non-nil and non-`toggle' case,
> > like so:
> >
> >   If called from Lisp, enable the mode if ARG is omitted or
> >   nil, toggle it if ARG is ‘toggle’, and disable it if ARG is
> >   any other non-nil value.
> 
> If the Lisp description is meant to be exhaustive by itself, we should
> cover the numeric case too:
> 
>    If called from Lisp, enable the mode if ARG is omitted, nil, or a
>    positive number; toggle it if ARG is `toggle'; and disable it
>    otherwise.

There's a magic word 'also", which should allow us to avoid
repetitions.





reply via email to

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