From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#70074: 29.1; js-ts-mode doesn't define comment-line-break-function Date: Mon, 8 Apr 2024 00:10:32 -0700 Message-ID: <8A759F5C-DA2B-43CC-BF19-3DEA98745986@gmail.com> References: <86msq971g0.fsf@gnu.org> <4b3706a2-84d8-43c4-95bb-02d6f8c450b0@gutov.dev> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12874"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 70074@debbugs.gnu.org, Evan Davis To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 08 09:11:20 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rtjA0-00038Q-Ox for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Apr 2024 09:11:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtj9f-0007rI-FG; Mon, 08 Apr 2024 03:10:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtj9e-0007r3-5L for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2024 03:10:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtj9d-0006x4-TO for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2024 03:10:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtj9l-000647-0T for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2024 03:11:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Apr 2024 07:11:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70074 X-GNU-PR-Package: emacs Original-Received: via spool by 70074-submit@debbugs.gnu.org id=B70074.171256025923260 (code B ref 70074); Mon, 08 Apr 2024 07:11:04 +0000 Original-Received: (at 70074) by debbugs.gnu.org; 8 Apr 2024 07:10:59 +0000 Original-Received: from localhost ([127.0.0.1]:45187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtj9f-000636-5x for submit@debbugs.gnu.org; Mon, 08 Apr 2024 03:10:59 -0400 Original-Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:53559) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtj9d-00062r-KM for 70074@debbugs.gnu.org; Mon, 08 Apr 2024 03:10:58 -0400 Original-Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6e703e0e5deso3675633b3a.3 for <70074@debbugs.gnu.org>; Mon, 08 Apr 2024 00:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712560244; x=1713165044; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OXz7/86gowURt1OsgoP4tuX9usjkVJR6rc2M4mOlx0Y=; b=WuEX01TrNYHe0Y3GF/etlsoyxIGq5tWZIaDRyQdXcRE5Z9aT5iwa8dclkwKmc+CLET A4fBFYAip1QhG92eIkkw00WrrADnn4pN8eq6P4p70W5otCjDjyCPGMrgrqeH4xpdiAlU POOQvVHtWpLPQaqh7sUgq06UBNQdiwgjiKYSidcxVPsAIxuWWU/MGcBLqlcMUYLpTphj qYv3RYGESGTAYke+1azDsfmg6WTiThitcaHZQQXV+x+n4vU+wkDW+BJd4daPXzq/fxoT 8zo5WNUPhy2tk/4nkw19EDc3RgtIEjl4m4rSbWHLA8JmYHqqTTPBcS50n/io5nshVJIb 42Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712560244; x=1713165044; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OXz7/86gowURt1OsgoP4tuX9usjkVJR6rc2M4mOlx0Y=; b=rPfUXds8VHPGLgVdbVTE8OEzO8nAv7diUtDbmCFOCHBHdHBUOnQyTSWDps4BPtfIdT mv+l0uYuj5cmqlF3IijRE0YefLCosbFfoEM6LwwcrzfEs5b8tvPM5FnYgwH46KkCA/by bLj5Ru1z+74yk1BGsDQAfsIp0bkcJALHPjJg1vZbJJtzn421HYHozt6UIZ5t3GG68EhW njjAN6LIK4JId3m//mJ4VZJPvnc9TRhSoPY0NKWCzk/v9iovdPpJaTDTRT+MA5txZqxP wu11HiAmpIYfkBa392eMXJFahR8taFFQBzK1S06UG1B2rHO7snwDmT3MOZAipTHT/W4a zBlQ== X-Forwarded-Encrypted: i=1; AJvYcCVzEETDpelKmLHh5ddFajLbuxcR4NfDM3RB9ga2dU1NLysxtziIEvr90RI2q6E762bM1+1m5jlEXHpdLEdHySFrnWcIFKg= X-Gm-Message-State: AOJu0YwE9kMOCD7MMALtTy/fGZyQl+Brt5tcroxO3dXCy5PbFg0Rjupw OZ53XfzJJw9DckocW1pKBDg1wYNx1frRUNsHAeLSEbClbELlH3Ni X-Google-Smtp-Source: AGHT+IFQAgtsD+YjnD7QzuoxXuf9+JHxx/uwaDwOMuwhRSqR4hFiddLFQUL1xF6mWeD81/iV35sSFQ== X-Received: by 2002:a05:6a20:7293:b0:1a3:65af:9baa with SMTP id o19-20020a056a20729300b001a365af9baamr7654728pzk.62.1712560244262; Mon, 08 Apr 2024 00:10:44 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:641:300:4910:6c00:57e9:a6fc:238b]) by smtp.gmail.com with ESMTPSA id 41-20020a17090a09ac00b002a528a1f907sm975688pjo.56.2024.04.08.00.10.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Apr 2024 00:10:43 -0700 (PDT) In-Reply-To: <4b3706a2-84d8-43c4-95bb-02d6f8c450b0@gutov.dev> X-Mailer: Apple Mail (2.3731.700.6) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282913 Archived-At: > On Apr 4, 2024, at 5:28 PM, Dmitry Gutov wrote: >=20 > On 04/04/2024 15:32, Eli Zaretskii wrote: >>> From: Evan Davis >>> Date: Fri, 29 Mar 2024 11:03:10 -0400 >>>=20 >>> js-ts-mode and js-mode behave differently when calling = default-indent-new-line (M-j) within a multiline >>> comment. >>>=20 >>> 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. >>>=20 >>> Expected behavior: >>> Block comments should be handled the same in both modes. >>>=20 >>> 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 >>>=20 >>> Follow the same steps in js-mode to observe the desired behavior. >> Dmitry, Yuan: any comments or suggestions? >=20 > I suppose following in js-mode's footsteps and reusing this part of CC = Mode is the obvious solution. >=20 > 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=E2=80=99t aware of this command before. Let me add = it to c-ts-common.el. Yuan=