GNU bug report logs -
#78680
typescript-ts-mode "fills" code when using (fill-paragraph)
Previous Next
Full log
Message #11 received at 78680 <at> debbugs.gnu.org (full text, mbox):
close 78680 31.0.50
thanks
> 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.
'c-ts-common-comment-setup' is a too confusing name.
It does more than just setting comment-related variables.
So 8bccccedb65a should have retained 'c-ts-common-comment-setup'.
Therefore I restored it in js-ts-mode and typescript-ts-base-mode.
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.