GNU bug report logs - #44341
27.1; define-minor-mode generates inaccurate docstring

Previous Next

Package: emacs;

Reported by: Thibault Polge <thibault <at> thb.lt>

Date: Sat, 31 Oct 2020 11:01:02 UTC

Severity: normal

Tags: fixed

Found in version 27.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 44341 <at> debbugs.gnu.org, Thibault Polge <thibault <at> thb.lt>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#44341: 27.1; define-minor-mode generates inaccurate docstring
Date: Mon, 02 Nov 2020 16:35:09 +0100
Philipp Stephani <p.stephani2 <at> gmail.com> writes:

>> >     disable ; Should disable (as a random symbol)
>> >     disable ; Again
>> >     "What?" ; Same.
>>
>> These should be considered as errors.  Whether we catch them and signal
>> an error or silently do something else is not particular important
>> to me.
>
> We should definitely signal an error here. A form such as (my-mode
> 'enable) actually disabling the mode is very confusing. The mode
> function needs to check for the various cases anyway, it might as well
> use `cond' and signal an error in the non-matching case.

We can't signal an error here -- ARG has been documented to accept these
values, and starting to signal an error would break a lot of people's
code.

(Now, ARG has been documented to work exactly opposite of the way it
really works for these values, but that's a different wrinkle.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 294 days ago.

Previous Next


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