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

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

Re: Cycle Auto-Fill


From: Christopher Dimech
Subject: Re: Cycle Auto-Fill
Date: Sun, 6 Dec 2020 01:49:21 +0100

> Sent: Sunday, December 06, 2020 at 1:30 AM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: daniela-spit@gmx.it
> Subject: Re: Cycle Auto-Fill
>
> Christopher Dimech <dimech@gmx.com> writes:
>
> > (set (make-local-variable 'comment-auto-fill-only-comments) t)
> >
> > and
> >
> > (set (make-local-variable 'comment-auto-fill-only-comments) nil)
> >
> > Additionally I do  (auto-fill-mode 1) and (auto-fill-mode nil),
> > which I think are buffer local.
>
> Yes, that's ok.  Since the state is also easy to get (by looking up the
> variables [auto-fill-mode is also a variable]), there is no need to save
> it explicitly.

So, only comment-auto-fill-only-comments need to be set to buffer local.  Right?
Returning back to taking the property "state".  If it is global. that would
only mean that in a different buffer the cycle would begin from a a different
starting point.  But then, the auto-fill settings would still be buffer local.

Does the order of the two commands matter?

(set (make-local-variable 'comment-auto-fill-only-comments) t)
(auto-fill-mode 1)

versus

(auto-fill-mode 1)
(set (make-local-variable 'comment-auto-fill-only-comments) t)

> > Have been giving the wrong strategy then.  Thought it would work differently
> > for each different buffer.  But you are saying symbol properties are always
> > global.   Bugger!  Would this be RTFM?
>
> Yes, it would, but only in subjunctive mood.



> Regards,
>
> Michael.
>



reply via email to

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