[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Auto Fill Comments
From: |
Christopher Dimech |
Subject: |
Re: Auto Fill Comments |
Date: |
Thu, 26 Nov 2020 22:14:35 +0100 |
I have done as follows. The problem started after reading that
for mode specific setup, comment-auto-fill-only-comments got to
be local
(setq-default fill-column 72)
(defun typh-auto-fill-mode (n)
"Breaks lines at a specific number of columns using Auto Fill."
(interactive "p")
(if (= n 0) (turn-off-auto-fill))
(if (= n 1)
(progn
(auto-fill-mode n)
(setq comment-auto-fill-only-comments t) ))
(if (= n 2)
(progn
(turn-on-auto-fill)
(setq comment-auto-fill-only-comments nil) )))
> Sent: Thursday, November 26, 2020 at 9:16 PM
> From: tomas@tuxteam.de
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: Auto Fill Comments
>
> On Thu, Nov 26, 2020 at 07:44:10PM +0100, Christopher Dimech wrote:
>
> [...]
>
> > Had thought that setq was actually a global thing, not local.
> > For local variables I was using "let" and "let*", but that seems
> > a wrong understanding.
>
> No, no. I was talking about buffer-local, i.e. bound to the
> buffer. Your local is wrt. to the code (dynamic or lexical)
>
> Buffer-local variables are global variables, as seen from the
> code's perspective.
>
> You didn't look at the docs, did you?
>
> Cheers
> - t
>
- Re: Auto Fill Comments, (continued)
- Re: Auto Fill Comments, Christopher Dimech, 2020/11/26
- Re: Auto Fill Comments, tomas, 2020/11/26
- Re: Auto Fill Comments, Christopher Dimech, 2020/11/26
- Re: Auto Fill Comments, daniela-spit, 2020/11/26
- Re: Auto Fill Comments, tomas, 2020/11/26
- Re: Auto Fill Comments, Christopher Dimech, 2020/11/26
- Re: Auto Fill Comments, Christopher Dimech, 2020/11/26
- Re: Auto Fill Comments, tomas, 2020/11/26
- Re: Auto Fill Comments, Christopher Dimech, 2020/11/26
- Re: Auto Fill Comments, Christopher Dimech, 2020/11/26
- Re: Auto Fill Comments,
Christopher Dimech <=
- RE: Auto Fill Comments, Drew Adams, 2020/11/26
- Re: RE: Auto Fill Comments, Christopher Dimech, 2020/11/26
- RE: RE: Auto Fill Comments, arthur miller, 2020/11/26
- Re: RE: RE: Auto Fill Comments, Christopher Dimech, 2020/11/26
- RE: RE: RE: Auto Fill Comments, arthur miller, 2020/11/26
- Re: RE: RE: Auto Fill Comments, Jean Louis, 2020/11/26
- Re: Auto Fill Comments, Arthur Miller, 2020/11/27
- Re: Auto Fill Comments, Christopher Dimech, 2020/11/27
- Re: Auto Fill Comments, Arthur Miller, 2020/11/27
- Re: Auto Fill Comments, Christopher Dimech, 2020/11/27