From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands Date: Fri, 5 Jun 2020 17:01:45 -0700 (PDT) Message-ID: <31a1c4f0-b92e-4ec6-8c2f-c4856f70b301@default> References: <963d4189-17dc-4f4e-9993-0335fa271e50@default> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="49035"; mail-complaints-to="usenet@ciao.gmane.io" To: 41727@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 06 02:03:10 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 1jhMIo-000CeW-6c for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Jun 2020 02:03:10 +0200 Original-Received: from localhost ([::1]:42882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhMIn-0004lK-5p for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 20:03:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhMIg-0004kw-Od for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 20:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhMIg-0004OR-Fn for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 20:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jhMIg-0002bI-AZ for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 20:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jun 2020 00:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41727 X-GNU-PR-Package: emacs Original-Received: via spool by 41727-submit@debbugs.gnu.org id=B41727.15914017239928 (code B ref 41727); Sat, 06 Jun 2020 00:03:02 +0000 Original-Received: (at 41727) by debbugs.gnu.org; 6 Jun 2020 00:02:03 +0000 Original-Received: from localhost ([127.0.0.1]:50360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhMHj-0002a4-Ky for submit@debbugs.gnu.org; Fri, 05 Jun 2020 20:02:03 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:51648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhMHh-0002ZY-H5 for 41727@debbugs.gnu.org; Fri, 05 Jun 2020 20:02:01 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 055NwEwY067152 for <41727@debbugs.gnu.org>; Sat, 6 Jun 2020 00:01:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=Ue5Q5R+XiAesqj621U1EkCMU/eDYOvLgM7fiq31i9CM=; b=oOMOpu4hQ9kx6IZicgXoHXm4iVz3GWnMb3OocjP3/2rd5kY7DT29NIy/7dsggNmjTOXO aoDBS2w9URbXS8oiZIuGScQpFkbl5rQ/JoSbFWu3JEwJXHxJ6lo/zbE9hiVioh2rhC72 b79GlfRScvZhBhdWF8a11qcBmMASNLZYvonBSeZWXDx8KqX5s1TKR3pPa+fbYqq4LzE8 wD/8zbQ22BU7muCH1njQQxtwy0G0vXxbRL3z8D/MWfH71E+QfbbQMfzzojhtGGXR1/3t j70NjWaW6EU1QSM8xcRL5Z39Iz9omColqtdMTUYBFj8riUe9TkUWIpTdn46nyNqLnSW9 oA== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 31f9265357-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for <41727@debbugs.gnu.org>; Sat, 06 Jun 2020 00:01:55 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 055NvdBg195636 for <41727@debbugs.gnu.org>; Sat, 6 Jun 2020 00:01:54 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 31f92629py-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <41727@debbugs.gnu.org>; Sat, 06 Jun 2020 00:01:54 +0000 Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 05601nD7027472 for <41727@debbugs.gnu.org>; Sat, 6 Jun 2020 00:01:54 GMT In-Reply-To: <963d4189-17dc-4f4e-9993-0335fa271e50@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5005.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9643 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 mlxscore=0 spamscore=0 suspectscore=13 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006050178 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9643 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 adultscore=0 suspectscore=13 cotscore=-2147483648 bulkscore=0 clxscore=1011 impostorscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=999 spamscore=0 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006050178 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:181588 Archived-At: For the (default) doc string of a minor mode, I think something like this should take care of it. Interactively, toggle the mode. But with a prefix arg, enable the mode if the numeric value is positive, and disable it otherwise. If called from Lisp, toggle the mode if the optional arg is 'toggle'. Otherwise, handle it as the prefix arg: disable the mode if `prefix-numeric-value' of the arg is non-positive, and enable it otherwise. This implies that if the arg is nil or absent then enable the mode. ___ Ideally, we would have a way to provide a custom doc string that also included this info somehow. Maybe the doc string of `define-minor-mode' could show the default doc string and suggest that if you provide your own doc string you include the same or similar information, if appropriate. (And it might generally be good if the Lisp info were at the end of the doc string.)