GNU bug report logs - #78680
typescript-ts-mode "fills" code when using (fill-paragraph)

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>

Date: Tue, 3 Jun 2025 13:42:04 UTC

Severity: normal

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Full log


View this message in rfc822 format

From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
To: 78680 <at> debbugs.gnu.org
Subject: bug#78680: typescript-ts-mode "fills" code when using (fill-paragraph)
Date: Tue, 03 Jun 2025 16:41:26 +0300
[Message part 1 (text/plain, inline)]
This is on latest master (50e3bce315e). To reproduce:

1. Create test.ts with this content:

	// test
	console.log("hello world")


2. Open as `emacs -Q test.ts`
3. Evaluate (progn (require 'treesit) (typescript-ts-mode))
4. Put caret at the word `test1`
5. Press M-q

Expected: nothing.
Actual: the code gets moved into the comment

-------------

I investigated the problem, it seems to be because `fill-comment-
function` is nil. From my understanding, it's supposed to be set by
invoking a common helper (c-ts-common-comment-setup), which I
implemented in the attached patch.

I am testing this to make sure there wouldn't be any adverse effects.

What's odd is that I don't seem to remember having this problem before,
and; and as a matter of fact we even have investigated a bug #77727
which wouldn't be possible with this issue. Seems like a regression.
[1.patch (text/x-patch, attachment)]

This bug report was last modified 13 days ago.

Previous Next


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