From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>,
Michael Kleehammer <michael@kleehammer.com>,
Yuan Fu <casouri@gmail.com>
Cc: 73900@debbugs.gnu.org
Subject: bug#73900: 30.0.91; auto-fill adds extra space in js-ts-mode
Date: Mon, 28 Oct 2024 05:10:35 +0200 [thread overview]
Message-ID: <eb499338-b47e-4626-94cc-d38acafefee5@gutov.dev> (raw)
In-Reply-To: <867c9tak7q.fsf@gnu.org>
On 27/10/2024 12:55, Eli Zaretskii wrote:
>> From: Michael Kleehammer<michael@kleehammer.com>
>> Date: Sat, 19 Oct 2024 22:46:55 -0500
>>
>> In Emacs 30, js-ts-mode auto-fill chooses an incorrect prefix when
>> wrapping comments.
>>
>> 1) emacs -Q
>>
>> 2) In the scratch buffer:
>> a) M-x js-ts-mode
>> b) M-x auto-fill-mode
>> c) M-x erase-buffer
>>
>> 3) Paste in a long JS comment:
>>
>> // This buffer is for text that is not saved, and for Lisp evaluation. To create a file, visit it
>>
>> 4) At end of line, press <Space>.
>>
>> The text wraps like so:
>>
>> // This buffer is for text that is not saved, and for Lisp evaluation.
>> // To create a file, visit it
>>
>> In previous versions, it would wrap like so:
>>
>> // This buffer is for text that is not saved, and for Lisp evaluation.
>> // To create a file, visit it
> Adding people who know about js-ts-mode, in the hope they will have
> comments or suggestions.
I suppose the answer is somewhere around the fact that we have both
normal-auto-fill-function and fill-paragraph-function, and that
js-ts-mode (through c-ts-common-comment-setup) only configures the
latter, while js-mode (in js--mode-setup) has settings for both.
Not sure why the default do-auto-fill doesn't skip over the space, though.
next prev parent reply other threads:[~2024-10-28 3:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-20 3:46 bug#73900: 30.0.91; auto-fill adds extra space in js-ts-mode Michael Kleehammer
2024-10-27 10:55 ` Eli Zaretskii
2024-10-27 23:52 ` Yuan Fu
2024-10-28 3:10 ` Dmitry Gutov [this message]
2024-10-29 7:33 ` Yuan Fu
2024-10-29 12:39 ` Eli Zaretskii
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=eb499338-b47e-4626-94cc-d38acafefee5@gutov.dev \
--to=dmitry@gutov.dev \
--cc=73900@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=michael@kleehammer.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.
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).