From: jai-bholeki@gmx.com
To: moasenwood@zoho.eu
Cc: help-gnu-emacs@gnu.org
Subject: Re: problems with auto-fill-mode
Date: Sat, 30 Jan 2021 18:14:08 +0100 [thread overview]
Message-ID: <trinity-d1b90a41-0183-4975-8be4-77bf92dc1164-1612026848312@3c-app-mailcom-bs16> (raw)
In-Reply-To: <87im7emk4w.fsf@zoho.eu>
> Sent: Sunday, January 31, 2021 at 5:04 AM
> From: "moasenwood--- via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: problems with auto-fill-mode
>
> jai-bholeki wrote:
>
> > Does it matter which expression to call first.
> >
> > (setq fill-column 72)
> > (auto-fill-mode)
> >
> > or
> >
> > (auto-fill-mode)
> > (setq fill-column 72)
>
> No, because the mode uses that variable setting every time
> it fills.
>
> But the top version looks better and makes more sense: first
> set it up, then enable.
I would also think that setting "comment-auto-fill-only-comments"
should also be set before enable.
(setq fill-column 72)
(setq-local comment-auto-fill-only-comments t)
(auto-fill-mode)
What about add-hook for auto-fill comments for specific files?
(defun break-comments-din ()
"Break lines when they exceed a specific character length."
(setq-local comment-auto-fill-only-comments t))
(add-hook 'sh-mode-hook #'break-comments-din)
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>
prev parent reply other threads:[~2021-01-30 17:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-30 16:36 problems with auto-fill-mode jai-bholeki
2021-01-30 16:54 ` jai-bholeki
2021-01-30 17:04 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-30 17:14 ` jai-bholeki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-d1b90a41-0183-4975-8be4-77bf92dc1164-1612026848312@3c-app-mailcom-bs16 \
--to=jai-bholeki@gmx.com \
--cc=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.