[Top][All Lists]

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

Re: Auto Fill Comments

From: Michael Heerdegen
Subject: Re: Auto Fill Comments
Date: Mon, 30 Nov 2020 00:41:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Christopher Dimech <> writes:

> Was trying to have a keybinding that cycles between three things:
> 1. Autofill Only Comments
> 2. Autofill Whole Buffer
> 3. Revert to No-Autofill
> Problem started because I should use buffer-local.  People suggested
> I read the manual to figure out what to do.  But couldn't follow things
> well enough to come up with something that works.

Any specific questions?  About things you didn't understand when

The basics are simple: You make a variable buffer local in the current
buffer with `make-local-variable'.  Then setting the variable whenever
that buffer is current sets the buffer local binding (in that buffer) of
this variable.  Evaluation of a variable results in the buffer local
value when there is one, else in the global binding.  `default-value' to
return the global binding of a variable regardless of buffer-local

See also `setq-local' which makes a variable buffer local in the current
buffer an sets the value at the same time.



reply via email to

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