From: Christopher Dimech <dimech@gmx.com>
To: michael-franzese@gmx.com
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Strange behaviour of auto-fill
Date: Sat, 24 Apr 2021 01:21:37 +0200 [thread overview]
Message-ID: <trinity-183bd9a3-f880-4711-9377-ae78d2cfef1e-1619220097953@3c-app-mailcom-bs03> (raw)
In-Reply-To: <trinity-9a9d8e04-f8f8-4fea-8970-f7694868f7e4-1619214169574@3c-app-mailcom-bs03>
Have had another go and noticed that calling
(turn-off-auto-fill)
will not break lines if the following is present
(setq-default auto-fill-function 'do-auto-fill)
My impression would be for developers to take a closer look at the
code, so that it's use would be simplified. Or perhaps some good
examples on how to use it, as it does not look so clear to me.
> Sent: Saturday, April 24, 2021 at 9:42 AM
> From: michael-franzese@gmx.com
> To: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Strange behaviour of auto-fill
>
> I am trying to set "auto-fill", with some tools to change "on-off" behaviour.
>
> Things get very confusing. When I comment out "(setq-default auto-fill-function 'do-auto-fill)", "auto-fill-mode" will still break comments even though "break-line" is "0"
> and one sets "(auto-fill-mode 0)".
>
>
>
> (setq-default auto-fill-function 'do-auto-fill)
> (defvar break-line 0)
>
> (defun break-line-ddd ()
> "Breaks long lines using auto-fill tool."
> (interactive)
>
> (pcase break-line
> ((or 'nil 0)
> (setq comment-auto-fill-only-comments nil)
> (auto-fill-mode 0)
> (message "%s %s"
> "Disable: Break line; " break-line)
> (setq break-line 1))
> (1
> (setq fill-column 72)
> (setq comment-auto-fill-only-comments t)
> (auto-fill-mode 1)
> (message "%s" "Enable: Break only comments")
> (setq break-line 2))
> (_
> (setq comment-auto-fill-only-comments nil)
> (auto-fill-mode 1)
> (message "%s" "Enable: Break all long lines")
> (setq break-line 0)) ))
>
> (defun break-line-set ()
> "Breaks long lines using auto-fill."
> (break-line-ddd)
> (global-set-key (kbd "H-b") #'break-line-ddd) )
>
> (break-line-set)
>
>
>
next prev parent reply other threads:[~2021-04-23 23:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 21:42 Strange behaviour of auto-fill michael-franzese
2021-04-23 22:20 ` Christopher Dimech
2021-04-23 23:21 ` Christopher Dimech [this message]
2021-04-23 23:23 ` michael-franzese
2021-04-23 23:36 ` Christopher Dimech
2021-04-24 0:47 ` michael-franzese
2021-04-24 0:59 ` michael-franzese
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-183bd9a3-f880-4711-9377-ae78d2cfef1e-1619220097953@3c-app-mailcom-bs03 \
--to=dimech@gmx.com \
--cc=help-gnu-emacs@gnu.org \
--cc=michael-franzese@gmx.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).