all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>, Evan Davis <davis.evan.m@gmail.com>,
	Yuan Fu <casouri@gmail.com>
Cc: 70074@debbugs.gnu.org
Subject: bug#70074: 29.1; js-ts-mode doesn't define comment-line-break-function
Date: Fri, 5 Apr 2024 03:28:10 +0300	[thread overview]
Message-ID: <4b3706a2-84d8-43c4-95bb-02d6f8c450b0@gutov.dev> (raw)
In-Reply-To: <86msq971g0.fsf@gnu.org>

On 04/04/2024 15:32, Eli Zaretskii wrote:
>> From: Evan Davis<davis.evan.m@gmail.com>
>> Date: Fri, 29 Mar 2024 11:03:10 -0400
>>
>> js-ts-mode and js-mode behave differently when calling default-indent-new-line (M-j) within a multiline
>> comment.
>>
>> Observed behavior:
>>    - in js-mode, M-j calls c-indent-new-comment-line, which correctly inserts a newline, indented to the correct
>> column and prefixed with '*'
>>    - in js-ts-mode, M-j calls comment-indent-new-line, which inserts an indented newline without the prefix.
>>
>> Expected behavior:
>> Block comments should be handled the same in both modes.
>>
>> Steps to reproduce:
>> 1. emacs -Q
>> 2. open a scratch buffer in js-ts-mode and enter text (without quotes) "/*"
>> 3. press M-j
>> 4. observe newline is created without star prefix
>>
>> Follow the same steps in js-mode to observe the desired behavior.
> Dmitry, Yuan: any comments or suggestions?

I suppose following in js-mode's footsteps and reusing this part of CC 
Mode is the obvious solution.

I haven't looked at the implementation closely enough to suggest 
something else, but it'd of course be nice to be able to provide a 
self-contained, shorter re-implementation instead.





  reply	other threads:[~2024-04-05  0:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 15:03 bug#70074: 29.1; js-ts-mode doesn't define comment-line-break-function Evan Davis
2024-04-04 12:32 ` Eli Zaretskii
2024-04-05  0:28   ` Dmitry Gutov [this message]
2024-04-08  7:10     ` Yuan Fu
2024-04-20  7:44       ` Eli Zaretskii
2024-04-22  4:35         ` Yuan Fu
     [not found]           ` <CAMojjrcdN9Yk61Rh6Pen1LWJrZZieJ+-QQCELT=yu4svNh1Tdg@mail.gmail.com>
2024-04-23  4:27             ` Yuan Fu

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=4b3706a2-84d8-43c4-95bb-02d6f8c450b0@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=70074@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=davis.evan.m@gmail.com \
    --cc=eliz@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 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.