unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: 44341@debbugs.gnu.org, Thibault Polge <thibault@thb.lt>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#44341: 27.1; define-minor-mode generates inaccurate docstring
Date: Mon, 02 Nov 2020 16:35:09 +0100	[thread overview]
Message-ID: <87h7q76ac2.fsf@gnus.org> (raw)
In-Reply-To: <CAArVCkQQLk0ysD4_i323KTMR5Uc7R-UdJQiLZgt8JUWYn0dmsg@mail.gmail.com> (Philipp Stephani's message of "Mon, 2 Nov 2020 13:28:06 +0100")

Philipp Stephani <p.stephani2@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





  reply	other threads:[~2020-11-02 15:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 11:00 bug#44341: 27.1; define-minor-mode generates inaccurate docstring Thibault Polge
2020-11-01 14:00 ` Lars Ingebrigtsen
2020-11-01 15:29 ` Stefan Monnier
2020-11-02 12:28   ` Philipp Stephani
2020-11-02 15:35     ` Lars Ingebrigtsen [this message]
2020-11-02 15:52     ` Eli Zaretskii
2020-11-02 16:18     ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h7q76ac2.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=44341@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=p.stephani2@gmail.com \
    --cc=thibault@thb.lt \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).