From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#44341: 27.1; define-minor-mode generates inaccurate docstring Date: Sun, 01 Nov 2020 10:29:27 -0500 Message-ID: References: <87361u64oo.fsf@thb.lt> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29882"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 44341@debbugs.gnu.org To: Thibault Polge Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 01 16:30:48 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZFJg-0007hT-G2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 16:30:48 +0100 Original-Received: from localhost ([::1]:57234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZFJf-0007iz-8G for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 10:30:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZFIw-0007ij-Sy for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 10:30:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZFIw-0007mD-JS for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 10:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZFIw-000691-EV for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 10:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 15:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44341 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 44341-submit@debbugs.gnu.org id=B44341.160424458223574 (code B ref 44341); Sun, 01 Nov 2020 15:30:02 +0000 Original-Received: (at 44341) by debbugs.gnu.org; 1 Nov 2020 15:29:42 +0000 Original-Received: from localhost ([127.0.0.1]:38240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZFIc-00068A-1i for submit@debbugs.gnu.org; Sun, 01 Nov 2020 10:29:42 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:22889) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZFIa-00067y-D0 for 44341@debbugs.gnu.org; Sun, 01 Nov 2020 10:29:40 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BC29C440980; Sun, 1 Nov 2020 10:29:34 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1D17544096C; Sun, 1 Nov 2020 10:29:33 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604244573; bh=1Ju7+MMgaIvE4EMKnmBnvJa7wuFQiNu0Qs9Y80319Ws=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=clmH8Db66Akp/zE2+d2S1XnXoCfSvEX2uZ4p8SGCj+iDY9lE3WLL6q//y6UTkYIsM 91o5iB6h3MLTHVK4puEQPgBA7BCA2zVQKvf/lb1CkfinIcT5HQvtQarrK8Ugq5jzyK IYP3EPFxrUhMaRqRfX/SzbxwWRpS7oW5868hTTYykMolGkChYG+MtXi1AejRbAPceI NXD8Lzu3aPX/AAB8E8Mxu12R82Kk4X9HAmrxSVudT49jCAxLhiAR++tyDm6lM1IWo1 d3Xrb2zphf2070n4xPQUXm9jvwHch4cZfZxIfXJ6BHwjTp/vmeQZIqA+0G03IH2dgJ yQw9xnpQDhvYg== Original-Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B08831201CD; Sun, 1 Nov 2020 10:29:32 -0500 (EST) In-Reply-To: <87361u64oo.fsf@thb.lt> (Thibault Polge's message of "Sat, 31 Oct 2020 12:00:23 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192403 Archived-At: > (mapcar > (lambda (x) (test-mode x) (cons x test-mode)) > '(t ; Should disable. An argument of the form t has traditionally enabled the mode. Many .emacs file have calls like (foo-mode t), so we need to preserve this. > nil ; Should disable The argument nil should definitely enable the mode. > -33 ; Should NOT disable (but will) > 33 ; Should enable Negative and positive are the "canonical" way to disable and enable a mode, no -33 should disable and 33 should enable. > 0 ; Should disable Historically, 0 has been defined to disable the mode, indeed. I recommend to use -1 instead, but a lot of code uses 0. > toggle ;=E2=80=AFShould toggle, and will. > toggle ;=E2=80=AFRepeated for confirmation Right. > 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. But we shouldn't document the behavior for those arguments as being anything else than errors. Stefan