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

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

Re: Cycle Auto-Fill


From: Michael Heerdegen
Subject: Re: Cycle Auto-Fill
Date: Sun, 06 Dec 2020 00:53:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Christopher Dimech <dimech@gmx.com> writes:

> It is warning me about variable n.

[ This thread and "Removing line and column number settings from some
buffers" have converged into the same exactly same state.  I wonder how
often that happens. ]

Yes, and it's a useful warning: the variable is "free", which means its
usage would interfere with other free usages of this variable.

In your code the variable seems to be a redundant duplication of the
value stored in (get 'gungadin-auto-fill-cycle 'state), so I would just
get rid of it.

But - a different issue: note that you are currently using one (global)
state to remember a (buffer) local feature.  I think you don't really
want it like this.  You probably won't get happy when you are using this
in multiple buffers at the same time.  That's where a variable gets
useful: it can be buffer local.  I would drop the
`gungadin-auto-fill-cycle' symbol property instead: symbol properties
are always global.  Of course could you save and maintain a table of the
states of all buffers there, but that would be rather exotic and
complex.


Regards,

Michael.




reply via email to

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