From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#32643: 26; minor-mode variables Date: Sat, 8 Sep 2018 19:53:49 +0200 Message-ID: <2e9b090d-a882-de8a-cd5e-979e1c00bb33@easy-emacs.de> 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> <2cd5533b-4b55-438a-9aa4-210d6f66dddf@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1536428886 12843 195.159.176.226 (8 Sep 2018 17:48:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2018 17:48:06 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 To: 32643@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 08 19:48:01 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 1fyhKz-0003ED-H7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Sep 2018 19:48:01 +0200 Original-Received: from localhost ([::1]:43988 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyhN6-00036E-3J for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Sep 2018 13:50:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyhMz-00035v-Qx for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 13:50:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fyhMw-00082L-ER for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 13:50:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45560) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fyhMw-000820-AY for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 13:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fyhMw-0000hT-7p for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 13:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Sep 2018 17:50:02 +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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15364289902668 (code B ref -1); Sat, 08 Sep 2018 17:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Sep 2018 17:49:50 +0000 Original-Received: from localhost ([127.0.0.1]:50578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyhMk-0000gx-Iv for submit@debbugs.gnu.org; Sat, 08 Sep 2018 13:49:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyhMj-0000gk-Lv for submit@debbugs.gnu.org; Sat, 08 Sep 2018 13:49:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fyhMd-0007nB-Ju for submit@debbugs.gnu.org; Sat, 08 Sep 2018 13:49:44 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33605) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fyhMd-0007n5-G3 for submit@debbugs.gnu.org; Sat, 08 Sep 2018 13:49:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyhMc-0002eH-Mh for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 13:49:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fyhMZ-0007kB-Dm for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 13:49:42 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.133]:47521) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fyhMZ-0007j3-3u for bug-gnu-emacs@gnu.org; Sat, 08 Sep 2018 13:49:39 -0400 Original-Received: from [192.168.178.35] ([94.223.84.66]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MFlnp-1g2KOA0oE9-00Ec9J for ; Sat, 08 Sep 2018 19:49:35 +0200 In-Reply-To: <2cd5533b-4b55-438a-9aa4-210d6f66dddf@default> Content-Language: en-US X-Provags-ID: V03:K1:wsa/rW4OScNRFfRyihyyVAzr5NnvoLxyEy//yDOf8gLM1VRY1yq DvaInp5Ymw39i8Nw+wa4e7fHMh+lEj6P1f0Ul3R4Xlv+tXW065NZtFjpEoc0BgEMJW+nMd5 u1yT+iEuP4QPdIOTalHwIO7juPaLRcNVlNZmaiDFAt1BPEcaRnQq4rieVH3WUy0imCuRhwY Zp22E8MZWXGRJfqJoNyCQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:+lkBSGNOhHw=:Zswd9iggsCfeJ1JGvTe8ZS fBEOCrlSm750SM1ywtwrRHtcO6ZmKBrf1lhSmJGkzKZw38EJSdjmFnaaVQJWdQTirnrtZmZ8j Lt0Wtx+V9SOst5L+oWCvLXSlslP0etv+1yXKvcUWhyzvPgOx7Qn9uIpV7aN6cQNyuChfSSwC5 CtY27Qni+cZEYI91ao5OxM5BuV6xdbfBtPhu7RrRBMWqubMNqsXFTF45jWZE7gXbTECMUkG6s GGZ5+0gf6+YlaDC/4qesY7gm6lAyTDpsBu0rLDjF3Q96/HygymqaMRElyRSSxXSL3dZ/uYsUb EpNF80MB4BuKUpoji4kaHkDyFMcy571TXNWRjbIU+qJLGRkyuzg4vUg1NA8562GXnLJc8MLQ1 8kcw0ku7eyGzYKIqMl5S4yCM/eTxAzKika124bIMcTRR4I9PPIzvzwraUT4ftm+1ojQE/y0MB MwcqLeiMoHbzueY+BMrBET/n2aOhaU8gLpF7lPG+zrG8VWjv6eamlaywc1si5kyiqeLWEiUAa tFnpDlXTuegfzlsHgAhwoVRXoDtdYP/11CFPDRjEZ4OvwIKB0eTrg15p6ElsM5eh7xrortr0Q 42op/8592tFGvKp4aekiZmoPZ3Le/kPg9m5ATVM3OPwyCPyNZExCoRwgyIJIo+MOjMyVNSZsP 0cmmzSa1BPuTatr/7+3TnRl+cK5yXFC7QNom3d9nBFkBEPGafPh4FhgKsHKyb6HUX0fVL6AEg OLGeFHzsjpFrVdI0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-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:150134 Archived-At: On 08.09.2018 15:58, Drew Adams wrote: >> > Why should it not have a variable >> > Why should `auto-fill-mode' be an exception? >> >> Because it isn't straightforward to do that. >> >> 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. > > > AFAIU setting such a variable would be helpful in all cases. It would provide a consistent way to check if the mode is on.