From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#36501: 26.2; (elisp) `Defining Minor Modes' Date: Thu, 4 Jul 2019 08:33:07 -0700 (PDT) Message-ID: <840640b2-bc37-4f56-b16e-0622321cb764@default> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="203039"; mail-complaints-to="usenet@blaine.gmane.org" To: 36501@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 04 17:50:54 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hj40b-000qSs-Gb for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Jul 2019 17:50:53 +0200 Original-Received: from localhost ([::1]:47008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hj3lL-0005rn-4b for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Jul 2019 11:35:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39432) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hj3kK-00056V-OM for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2019 11:34:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hj3kI-0003hk-Ab for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2019 11:34:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42916) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hj3kI-0003hN-3C for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2019 11:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hj3kH-0002vF-VU for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2019 11:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jul 2019 15:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36501 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156225440611185 (code B ref -1); Thu, 04 Jul 2019 15:34:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jul 2019 15:33:26 +0000 Original-Received: from localhost ([127.0.0.1]:51737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hj3ji-0002uJ-AI for submit@debbugs.gnu.org; Thu, 04 Jul 2019 11:33:26 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:58265) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hj3jg-0002uB-NZ for submit@debbugs.gnu.org; Thu, 04 Jul 2019 11:33:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39338) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hj3je-0004gQ-QG for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2019 11:33:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hj3ja-00034w-LG for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2019 11:33:20 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:47702) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hj3jW-0002w0-UR for bug-gnu-emacs@gnu.org; Thu, 04 Jul 2019 11:33:16 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x64FT6T5084575 for ; Thu, 4 Jul 2019 15:33:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=ufWULZ6sYtE+FoZIjwD2418Hbj1DBAMjeVzJ8UhdclE=; b=iA5Y2p/PBRMj6Em9pUZOJ25sH6OqYZNrvAa49sREIsyFnL0xQLQuboCxZXPGmvque5Ju FmtNG/9Pcf/Zcj9Qk6+uGOb/dUr/4Y5fFxdCh6/6SrDAOZJHYXTPgzCGhV+wku+2FwAT jneaPPXBvK/FGSPqfYybSujO2PwX+fs16+6Q7Wip2di7ANX4fnpbbtlou/7X6DPQeac8 wTjG70ruW5+bljqV04TJ4SzmUCnaNrxZdUYa0+9fuCXPGi/4aeNXsqVrWe2lefDnSctc 15HpdXhS/BP6+giguubkQPPAiOTfhyp59uXYCyRNFgby9dYc16WQoWLKsyzxWcrrTqsU SQ== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2te61q7dv3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 04 Jul 2019 15:33:09 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x64FX1E1192447 for ; Thu, 4 Jul 2019 15:33:09 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2th5qm3nvy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 04 Jul 2019 15:33:09 +0000 Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x64FX8rv032127 for ; Thu, 4 Jul 2019 15:33:08 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9307 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907040197 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9307 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907040196 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162064 Archived-At: The examples defining `hungry-mode', and their descriptions, don't seem completely correct. Unless a minor mode is declared to be global, which `hungry-mode' is not, I don't think it defines a user option. But this doc says: It puts the variable 'hungry-mode' into custom group 'hunger'. Does that happen? Even if I define a `hunger' group before evaluating those `define-minor-mode' sexps I don't see that `M-x customize-group' gets you to variable `hungry-mode'. But I didn't test much, e.g. with different `defgroup' definitions for group `hungry'. My guess is that (1) `:group 'hunger' should be removed from the examples and (2) the doc should not say that variable `hungry-mode' is put "into custom group `hunger'. It should not give the impression that var `hungry-mode' is a user option. --- I also think it's not so important to show two full examples for the buffer-local mode, and it might be good to show an example for a global mode - perhaps even two: (1) using `define-minor-mode' and (2) using `define-globalized-minor-mode'. In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32) of 2019-04-13 Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749 Windowing system distributor `Microsoft Corp.', version 10.0.17134 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3''