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: Drew Adams <drew.adams <at> oracle.com>
To: Philipp Stephani <p.stephani2 <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 44341 <at> debbugs.gnu.org, Thibault Polge <thibault <at> thb.lt>
Subject: bug#44341: 27.1; define-minor-mode generates inaccurate docstring
Date: Mon, 2 Nov 2020 08:18:24 -0800 (PST)
> 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.

Not to argue, but this kind of thing is all over
Emacs Lisp.

The ability to use an unspecified non-nil value,
to mean/do something that might work against the
natural-language "meaning" of the name of a
symbol argument, is just one example of the vast
amounts of rope that Lisp gives its users to hang
themselves with.

Do you really think `define-minor-mode' should
be fiddled with specially here, to prevent use
of an unfortunately named symbol arg to disable
the mode?

`define-minor-mode' and its doc, and the doc of
minor modes, are already complex/confusing enough.
Do you think fiddling to eliminate confusion over
poorly named symbol values won't actually add to
that confusion?




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.