bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32643: 26; minor-mode variables


From: Andreas Röhler
Subject: bug#32643: 26; minor-mode variables
Date: Mon, 10 Sep 2018 09:27:49 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 09.09.2018 16:12, Drew Adams wrote:
   > Applying common sense, the obvious explanation is that auto-fill-mode
   > controls only a single variable (i.e., `auto-fill-function'), and adding
   > an extra `auto-fill-mode' which would then have to be kept in sync just
   > to conform to some convention is not worth the trouble.

We could arrange for Auto-Fill mode to be controlled by a variable
auto-fill-mode.  Change the auto-fill code so that two variables
control it: (and auto-fill-mode auto-fill-function (funcall
auto-fill-function ...)).  Then we could leave auto-fill-function set
up all the time, and enable/disable the mode by setting auto-fill-mode
as with most other minor modes.

I do hope that someone does something, perhaps along those lines,
to provide an `auto-fill-mode' variable.

As I said, I'm not familiar with the `:variable' stuff. I'd think that using
`:set' would be sufficient, to ensure that both variables are updated
correctly whenever `auto-fill-mode' is set. But perhaps that would
not suffice to ensure that whenever `auto-fill-function' is set.

(A guess is that using `:variable' provides a simpler or more elegant
way of doing what could be done using `:set'.)




Maybe that can be done by defmacro define-minor-mode already - no need for hand-writing?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]