GNU bug report logs - #70074
29.1; js-ts-mode doesn't define comment-line-break-function

Previous Next

Package: emacs;

Reported by: Evan Davis <davis.evan.m <at> gmail.com>

Date: Fri, 29 Mar 2024 16:03:02 UTC

Severity: normal

Found in version 29.1

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: dmitry <at> gutov.dev, 70074 <at> debbugs.gnu.org, davis.evan.m <at> gmail.com
Subject: bug#70074: 29.1; js-ts-mode doesn't define comment-line-break-function
Date: Sat, 20 Apr 2024 10:44:03 +0300
Ping!  Yuan, can we make some progress here?

> From: Yuan Fu <casouri <at> gmail.com>
> Date: Mon, 8 Apr 2024 00:10:32 -0700
> Cc: Eli Zaretskii <eliz <at> gnu.org>,
>  Evan Davis <davis.evan.m <at> gmail.com>,
>  70074 <at> debbugs.gnu.org
> 
> 
> 
> > On Apr 4, 2024, at 5:28 PM, Dmitry Gutov <dmitry <at> gutov.dev> wrote:
> > 
> > On 04/04/2024 15:32, Eli Zaretskii wrote:
> >>> From: Evan Davis<davis.evan.m <at> 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.
> 
> Sounds good. I wasn’t aware of this command before. Let me add it to c-ts-common.el.
> 
> Yuan




This bug report was last modified 1 year and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.