From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 59763@debbugs.gnu.org
Subject: bug#59763: 29.0.60; Filling for c-ts-mode
Date: Sat, 24 Dec 2022 09:42:30 +0100 [thread overview]
Message-ID: <456ED673-26A2-408C-BC8E-70450C90ABD6@thornhill.no> (raw)
In-Reply-To: <EA8E6A47-F5AA-4B32-A204-D94772310D91@gmail.com>
On 24 December 2022 09:36:21 CET, Yuan Fu <casouri@gmail.com> wrote:
>
>Theodor Thornhill <theo@thornhill.no> writes:
>
>> Yuan Fu <casouri@gmail.com> writes:
>>
>>>> On Dec 2, 2022, at 6:58 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>>>>
>>>>> From: Yuan Fu <casouri@gmail.com>
>>>>> Date: Thu, 1 Dec 2022 21:33:06 -0800
>>>>>
>>>>>
>>>>> IMO For c-ts-mode to be usable we need to have at least a basic filling
>>>>> function. Below is the function I have in my init.el, could someone have
>>>>> a look and see if it’s good? Alternatively we could copy out the comment
>>>>> and fill it in a temp buffer with c-mode, but I didn’t have the time to try
>>>>> it out and see how well it works.
>>>>
>>>> Thanks.
>>>>
>>>> From quick testing, I see a problem:
>>>>
>>>> . Visit dispnew.c and go to the comment that starts on line 324. Delete
>>>> the newline between the two lines of the comment, and invoke the
>>>> function. Observe how the first non-blank character of the comment's
>>>> second line is aligned with the "/*" on the previous line, not with the
>>>> text after "/*" as I'd expect.
>>>
>>> I see. I’ll need to look at how cc-mode fill comments.
>>>
>>>>
>>>> Btw, this command should be bound to M-q in ts-c-mode.
>>>
>>> Will do, once our fill function works well. BTW, Theo, if you have any
>>> idea, don’t hesitate to go ahead :-) No obligations, of course.
>>>
>>> Yuan
>>
>> Sure! Added to my list :) I had a function at some point that used
>> c-mode to do this. I'll see if I can polish it a little.
>
>I did some work in filling, it should work like cc-mode in like 90% of
>the cases now, yay!
>
>Yuan
Nice! For all cc-ts-modes?
Theo
next prev parent reply other threads:[~2022-12-24 8:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-02 5:33 bug#59763: 29.0.60; Filling for c-ts-mode Yuan Fu
2022-12-02 14:58 ` Eli Zaretskii
2022-12-03 0:54 ` Yuan Fu
2022-12-05 11:47 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24 8:36 ` Yuan Fu
2022-12-24 8:42 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-12-25 1:30 ` Yuan Fu
2022-12-25 7:33 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-26 21:31 ` Yuan Fu
2022-12-26 22:03 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-26 22:51 ` Yuan Fu
2022-12-26 23:00 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-07 23:11 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=456ED673-26A2-408C-BC8E-70450C90ABD6@thornhill.no \
--to=bug-gnu-emacs@gnu.org \
--cc=59763@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=theo@thornhill.no \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).