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: Sat, 8 Sep 2018 06:58:24 -0700 (PDT) Message-ID: <2cd5533b-4b55-438a-9aa4-210d6f66dddf@default> References: <<<3ce888af-aa04-4dd2-99b5-0882e37024f3@default> >> <<<494224f1-815f-4fb4-a779-75e243b519f0@default>>> <<<83sh2mwv8w.fsf@gnu.org>>> <<488f04e4-8389-459b-b3c7-603e48bed452@default>> <<83lg8ewk2c.fsf@gnu.org>> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1536415028 25730 195.159.176.226 (8 Sep 2018 13:57:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2018 13:57:08 +0000 (UTC) Cc: 32643@debbugs.gnu.org To: rms@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 08 15:57: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 1fydjT-0006Zw-Kq for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Sep 2018 15:57:03 +0200 Original-Received: from localhost ([::1]:42618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fydlZ-0007eI-Qa for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Sep 2018 09:59:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fydlT-0007eC-A5 for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 09:59:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fydlO-0007r1-37 for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 09:59:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45479) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fydlN-0007qq-Uz for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 09:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fydlN-0003UO-Qz for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 09:59: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: Sat, 08 Sep 2018 13:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32643 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32643-submit@debbugs.gnu.org id=B32643.153641512813385 (code B ref 32643); Sat, 08 Sep 2018 13:59:01 +0000 Original-Received: (at 32643) by debbugs.gnu.org; 8 Sep 2018 13:58:48 +0000 Original-Received: from localhost ([127.0.0.1]:50497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fydl9-0003Tp-RU for submit@debbugs.gnu.org; Sat, 08 Sep 2018 09:58:48 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:33094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fydl7-0003TY-BN for 32643@debbugs.gnu.org; Sat, 08 Sep 2018 09:58:45 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w88DudYc054687; Sat, 8 Sep 2018 13:58:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=q/BAB7Q8/dCy/D31RjFHlH6bGpgh4DspXxK0S/lgtWg=; b=Kfg86xXD7lCV03tQjU5wffnqs4iEUmqZzfDXCshzSzIHfG37QFGVGxZiAp2AT+TqIuYg EgwyA7+p42GsnILYuvytnX6LXzaFrPk6DAAA2mSPmypQXZdkMHIV3iMGsVpPb2a2ebod yPDoKquStKqWqRqSLxvSwHK9lBXnUJHrTQkwG8FMUHcuwDiBlbxlqNmCkgMBpaJBwvuN JosUg2qDf6/MO6b1fikz/GEBpcS87Kj+G88RCpbI4bC00Eb42WBnprSBfLAZu1+N0+tD j/8D4ll/8M6lMncmYQNUGUPRl7pQ5BJkeoYk+5H76q2mF2EFoc9kz+yNoIlyAQKmetjZ yQ== Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2mc72q8s7w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 08 Sep 2018 13:58:39 +0000 Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w88DwW3V029866 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 8 Sep 2018 13:58:33 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w88DwU6f018527; Sat, 8 Sep 2018 13:58:31 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4735.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9009 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=910 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809080152 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:150131 Archived-At: > > Why should it not have a variable > > Why should `auto-fill-mode' be an exception? >=20 > Because it isn't straightforward to do that. >=20 > It may be possible with some work. > Would you like to write the change? Noam's message points out the use of :variable in defining this minor mode.= I don't understand `define-minor-mode' and its :variable enough to propose a simple fix. Maybe someone else does? In this case, the PLACE value of `:variable PLACE' is this generalized variable: (auto-fill-function . (lambda (v) (setq auto-fill-function (if v normal-auto-fill-function)))) Is there a way, for example, to defvaralias `auto-fill-mode' to `auto-fill-function' (or vice versa), so that that :variable value would somehow have the effect of automatically keeping `auto-fill-mode' updated to the same value? Or some other wayt to easily accomplish the same thing? If there is no straightforward way to get `auto-fill-mode' to remain synced with `auto-fill-function', and if it's necessary to have two separate variables, then OK, for this particular variable. As I said earlier, it's good that the doc string, at least, makes clear that non-nil `auto-fill-function' means the mode is on. The bug report is more general, asking generally about minor modes that have no mode variable, and what reasons/criteria there might be for such cases. This one apparently has a reason - it is not just a "historical accident". Dunno whether there are others that could just have their variables defined with no complications.