From: Stephen Berman <stephen.berman@gmx.net>
To: 28003@debbugs.gnu.org
Subject: bug#28003: 26.0.50; Auto fill broken in Message mode
Date: Mon, 07 Aug 2017 21:56:42 +0200 [thread overview]
Message-ID: <87shh3cft1.fsf@rosalinde> (raw)
This change:
commit 9b463fa8648b7baed95a44f4317cb7402fd8bf1c
Author: Tom Tromey <tom@tromey.com>
Date: Sat Aug 5 18:30:52 2017 -0600
Respect comment-auto-fill-only-comments
Respect comment-auto-fill-only-comments when auto-filling and a
comment syntax is defined.
* lisp/newcomment.el (comment-indent-new-line): Do not check
comment-auto-fill-only-comments.
* lisp/simple.el (internal-auto-fill): New defun.
* src/cmds.c (internal_self_insert): Call Qinternal_auto_fill, not
auto_fill_function.
(syms_of_cmds): Define Qinternal_auto_fill.
broke auto filling in Message mode; the breakage is due specifically to
this change in comment-indent-new-line:
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 8772b52376..e3ee4dfab1 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -1382,10 +1382,9 @@ comment-indent-new-line
(interactive)
(comment-normalize-vars t)
(let (compos comin)
- ;; If we are not inside a comment and we only auto-fill comments,
- ;; don't do anything (unless no comment syntax is defined).
+ ;; If we are not inside a comment don't do anything (unless no
+ ;; comment syntax is defined).
(unless (and comment-start
- comment-auto-fill-only-comments
(not (called-interactively-p 'interactive))
(not (save-excursion
(prog1 (setq compos (comment-beginning))
To reproduce:
0. emacs -Q
1. Type `C-x m' to get a Message mode buffer, with a fill-column of 70.
2. Insert at point-max this text (all in one unbroken line):
This is a test. This is a test. This is a test. This is a test. This is a test.
3. Point is now in column 79; type SPC.
=> The line is not broken and filled.
4. Delete the last SPC, type `C-a > SPC C-e SPC'.
=> This line is now broken and filled.
Message mode sets "> " and comment-auto-fill-only-comments to nil by
default, but since the above change eliminated checking the latter,
after step 3 the unless condition evaluates to t, so there's no
auto-filling; while after step 4, (comment-beginning) is non-nil, so the
unless condition is nil and auto-filling occurs.
In GNU Emacs 26.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.8)
of 2017-08-07 built on rosalinde
Repository revision: 14ea76af5f3596d48747c2437006f6e1abcb67a7
Windowing system distributor 'The X.Org Foundation', version 11.0.11901000
next reply other threads:[~2017-08-07 19:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 19:56 Stephen Berman [this message]
2017-08-09 3:33 ` bug#28003: 26.0.50; Auto fill broken in Message mode Katsumi Yamaoka
2017-08-09 8:58 ` Stephen Berman
2017-08-09 12:37 ` Tom Tromey
2017-08-09 13:04 ` Stephen Berman
2017-08-09 14:54 ` Stephen Berman
2017-08-09 15:41 ` Stephen Berman
2017-08-09 22:08 ` Tom Tromey
2017-08-09 23:06 ` Katsumi Yamaoka
2017-08-10 8:07 ` Stephen Berman
2017-08-27 16:55 ` bug#28003: done Tom Tromey
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=87shh3cft1.fsf@rosalinde \
--to=stephen.berman@gmx.net \
--cc=28003@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).