From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: 32643@debbugs.gnu.org
Subject: bug#32643: 26; minor-mode variables
Date: Sat, 8 Sep 2018 19:53:49 +0200 [thread overview]
Message-ID: <2e9b090d-a882-de8a-cd5e-979e1c00bb33@easy-emacs.de> (raw)
In-Reply-To: <2cd5533b-4b55-438a-9aa4-210d6f66dddf@default>
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.
next prev parent reply other threads:[~2018-09-08 17:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 15:13 bug#32643: 26; minor-mode variables Drew Adams
2018-09-06 5:51 ` Richard Stallman
2018-09-06 14:18 ` Drew Adams
2018-09-06 14:33 ` Eli Zaretskii
2018-09-08 2:07 ` Noam Postavsky
2018-09-08 2:25 ` Drew Adams
2018-09-09 20:33 ` Noam Postavsky
2018-09-09 22:09 ` Drew Adams
2018-09-12 0:51 ` Noam Postavsky
2018-09-12 1:46 ` Drew Adams
2018-09-13 3:32 ` Richard Stallman
2018-09-13 13:28 ` Basil L. Contovounesios
2018-09-09 6:05 ` Richard Stallman
2018-09-09 14:12 ` Drew Adams
2018-09-10 7:27 ` Andreas Röhler
[not found] ` <<494224f1-815f-4fb4-a779-75e243b519f0@default>
[not found] ` <<83sh2mwv8w.fsf@gnu.org>
2018-09-06 14:51 ` Drew Adams
2018-09-06 18:35 ` Eli Zaretskii
[not found] ` <<<494224f1-815f-4fb4-a779-75e243b519f0@default>
[not found] ` <<<83sh2mwv8w.fsf@gnu.org>
[not found] ` <<488f04e4-8389-459b-b3c7-603e48bed452@default>
[not found] ` <<83lg8ewk2c.fsf@gnu.org>
2018-09-07 0:10 ` Drew Adams
2018-09-07 6:40 ` Eli Zaretskii
2018-09-08 5:13 ` Richard Stallman
2018-09-08 13:58 ` Drew Adams
2018-09-08 17:53 ` Andreas Röhler [this message]
[not found] ` <<<<494224f1-815f-4fb4-a779-75e243b519f0@default>
[not found] ` <<<<83sh2mwv8w.fsf@gnu.org>
[not found] ` <<<488f04e4-8389-459b-b3c7-603e48bed452@default>
[not found] ` <<<83lg8ewk2c.fsf@gnu.org>
[not found] ` <<fb9c0be1-c9da-4cf8-aab3-fd54a0a97e68@default>
[not found] ` <<83lg8dvmia.fsf@gnu.org>
2018-09-07 15:07 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e9b090d-a882-de8a-cd5e-979e1c00bb33@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=32643@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).