From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#32643: 26; minor-mode variables Date: Wed, 5 Sep 2018 08:13:45 -0700 (PDT) Message-ID: <3ce888af-aa04-4dd2-99b5-0882e37024f3@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1536160389 28341 195.159.176.226 (5 Sep 2018 15:13:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Sep 2018 15:13:09 +0000 (UTC) To: 32643@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 05 17:13:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxZUM-0007CP-UZ for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Sep 2018 17:13:03 +0200 Original-Received: from localhost ([::1]:56722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxZWT-0004zQ-Ap for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Sep 2018 11:15:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxZWM-0004z3-TG for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2018 11:15:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fxZWJ-0001ho-IE for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2018 11:15:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42301) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fxZWJ-0001hC-9w for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2018 11:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fxZWI-0006uL-QY for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2018 11:15:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Sep 2018 15:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32643 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.153616044826464 (code B ref -1); Wed, 05 Sep 2018 15:15:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Sep 2018 15:14:08 +0000 Original-Received: from localhost ([127.0.0.1]:47319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxZVP-0006sm-NB for submit@debbugs.gnu.org; Wed, 05 Sep 2018 11:14:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxZVM-0006sA-2d for submit@debbugs.gnu.org; Wed, 05 Sep 2018 11:14:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fxZVF-0000CD-Qv for submit@debbugs.gnu.org; Wed, 05 Sep 2018 11:13:58 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56020) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fxZVE-0000BC-5U for submit@debbugs.gnu.org; Wed, 05 Sep 2018 11:13:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxZVD-0004n7-2s for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2018 11:13:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fxZV9-0008SR-S2 for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2018 11:13:55 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:43942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fxZV9-0008NU-IY for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2018 11:13:51 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w85F4B6h098765 for ; Wed, 5 Sep 2018 15:13:48 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=xNaSiq7y6swKU6VRnEUk9bhnpUcaxSdzYCavGD0jt6E=; b=0J09l8L+Fft/1uroxWqBTnjR8EMU8riHRknNF8Efhp5Djoh76gO/7FbwvUeLkYRAKRit q9AEvQiPwEfBaNwm8QsNQWC/X8gynEgCOsy6wO3BMM8w0484bzpymgfcMKdDeDym45em M7gy9ImWXICANkiNjsrHbrOQ9irTHbiWiHPaZfJ0ZJw/3y0wq8bqMYruM4hJfYSMRjqP WhhwglyBz3GlQo0hBmfX1QyNabp4yr4+gcpFMfL5ZpIFD3ITaVEQiRJiqfXgg+poz1cj yrtKFs/68hUH+ZmAfX+X6Xx5pWAOT4C16AH95Ji8ggC97vKzAR4mLPyJeiAFQLhNFyyE bQ== Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2m7jqpmmax-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 05 Sep 2018 15:13:47 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w85FDlGo029029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 5 Sep 2018 15:13:47 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w85FDkYN018777 for ; Wed, 5 Sep 2018 15:13:46 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4732.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9006 signatures=668708 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=920 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809050159 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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: 208.118.235.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:150051 Archived-At: (emacs) `Minor Modes' says "Most minor modes also have a "mode=20 variable", with the same name as the mode command." It doesn't say why some do and some don't. Why doesn't it? What's the answer to that question? For example, why doesn't variable `auto-fill-mode' exist? Shouldn't all minor modes have a variable? Which ones should? Beyond the Emacs manual, (elisp) `Minor Mode Conventions' says this: Define a variable whose name ends in '-mode'. We call this the "mode variable". The minor mode command should set this variable. The value will be 'nil' if the mode is disabled, and non-'nil' if the mode is enabled. The variable should be buffer-local if the minor mode is buffer-local. This variable is used in conjunction with the 'minor-mode-alist' to display the minor mode name in the mode line. It also determines whether the minor mode keymap is active, via 'minor-mode-map-alist' (*note Controlling Active Maps::). Individual commands or hooks can also check its value. That says that, by convention, minor modes ahould have a variable. Isn't it then a bug that some provided by Emacs do not? And shouldn't the Elisp manual (and perhaps the Emacs manual) give criteria for when a minor mode should probably not have a variable? What's more, the same node about conventions says this: Define a command, called the "mode command", whose name is the same as the mode variable. Its job is to set the value of the mode variable, plus anything else that needs to be done to actually enable or disable the mode's features. That suggests that the primary job of the mode command is to set the mode variable. This suggests strongly that it is a bug not to have a mode variable. In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30 Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea Windowing system distributor `Microsoft Corp.', version 10.0.16299 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3''