bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#73900: 30.0.91; auto-fill adds extra space in js-ts-mode


From: Dmitry Gutov
Subject: bug#73900: 30.0.91; auto-fill adds extra space in js-ts-mode
Date: Mon, 28 Oct 2024 05:10:35 +0200
User-agent: Mozilla Thunderbird

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]