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#59763: 29.0.60; Filling for c-ts-mode Date: Sat, 24 Dec 2022 00:36:21 -0800 Message-ID: References: <69D98973-6824-47B3-900F-6DBEE669932F@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="37310"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 59763@debbugs.gnu.org To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 24 09:39:51 2022 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 1p904N-0009ZG-0C for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Dec 2022 09:39:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p902C-0002nL-0u; Sat, 24 Dec 2022 03:37:36 -0500 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 1p901e-0002Z5-NP for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2022 03:37:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p901e-0003o4-6Q for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2022 03:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p901d-0003PI-Vh for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2022 03:37:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <69D98973-6824-47B3-900F-6DBEE669932F@gmail.com> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Dec 2022 08:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59763 X-GNU-PR-Package: emacs Original-Received: via spool by 59763-submit@debbugs.gnu.org id=B59763.167187099113083 (code B ref 59763); Sat, 24 Dec 2022 08:37:01 +0000 Original-Received: (at 59763) by debbugs.gnu.org; 24 Dec 2022 08:36:31 +0000 Original-Received: from localhost ([127.0.0.1]:41724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p9018-0003Ox-Nu for submit@debbugs.gnu.org; Sat, 24 Dec 2022 03:36:31 -0500 Original-Received: from mail-pj1-f48.google.com ([209.85.216.48]:50900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p9017-0003Op-1w for 59763@debbugs.gnu.org; Sat, 24 Dec 2022 03:36:29 -0500 Original-Received: by mail-pj1-f48.google.com with SMTP id fy4so6868054pjb.0 for <59763@debbugs.gnu.org>; Sat, 24 Dec 2022 00:36:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=HKOH+KMjNcBEv+4cv3zan+lUoTHcv8qhD9kw6RQWYNw=; b=efiRTG+391t7bYZXinJiUaCYSR4mYeEOMvUay9jlbEzQHwZERmsFV5zc3jodtoZUq5 00HqZ4z2W8Bb2/ugZMLpFrJf978nk9NfwBaKZhT1B4xQZR5E5NgZ40x33yZ00Q8tkaWP trpxvQHv5/l7hNWVJYEssEG/3joGPxKLHwq79TKnmjaG6uhwHlvdMIJmMwLUvIVMgQ9+ p5s3VUNLfQbbpDEKOeAs7NNah2AivmP1iGgMDIl28GiJP6MCOR3CDm3jlxrd8SPC7Ljc Bv/zePoPTBxBdHFvDI3c3MnkpodN6hJaXKZTxQFfi8jTSw/Tz6+7Cl9rtQ6iHB6nBrXF fZMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HKOH+KMjNcBEv+4cv3zan+lUoTHcv8qhD9kw6RQWYNw=; b=btqMSf5Ar5j2T53mxtd1tQ7abNxZSyd0eQ7IqrIajwCUQbTaMy/6IZlwjgAFWCTSkV uhXkTwtkRoqAEjjEkiehIw8ceQcCFq2Df6hBfKbO5NV0ruV+UgfIa+7D/tU4OfCuJkOP jz/XRjO8LhXZRdQytDfsbQVFQQZleVUODNV/a3sSM9wr4msNYiK6yo7EONe3OW9dFtpz 0ifwucxdbeKaQOFvuE1FZvVUEqq8LQBBpxtwoWj/9UUq8rBoq+R4Z9pp3j2MtstTS9+K 5J5UCEwgqADOm8DHLvJSN4vAcM+D+AORaFw3CV9dQkqWF+iPE2skhOU/AiAg8wxknxrH Jk2Q== X-Gm-Message-State: AFqh2kpf+DhPl+nUHqOpj4D/rLKezLRfz39ytE2uNqelfLWRkScPTo/Q wBk983wWtkOTezIrPnx+i8d6qdk1V9c= X-Google-Smtp-Source: AMrXdXstL1qZvuyewoIfHVWZbxJiwmV6RECPrInBm5M577LXiKBPUiJ3DBSFrosyr/rr7lJ4yY7RjA== X-Received: by 2002:a17:902:8d8f:b0:191:3b7b:3c2c with SMTP id v15-20020a1709028d8f00b001913b7b3c2cmr12430765plo.22.1671870983178; Sat, 24 Dec 2022 00:36:23 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id f15-20020a170902ab8f00b0018862bb3976sm3495133plr.308.2022.12.24.00.36.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Dec 2022 00:36:22 -0800 (PST) X-Mailer: Apple Mail (2.3696.120.41.1.1) 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:251777 Archived-At: Theodor Thornhill writes: > Yuan Fu writes: > >>> On Dec 2, 2022, at 6:58 AM, Eli Zaretskii wrote: >>>=20 >>>> From: Yuan Fu >>>> Date: Thu, 1 Dec 2022 21:33:06 -0800 >>>>=20 >>>>=20 >>>> 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=E2=80=99s good? Alternatively we could copy = out the comment >>>> and fill it in a temp buffer with c-mode, but I didn=E2=80=99t have = the time to try >>>> it out and see how well it works. >>>=20 >>> Thanks. >>>=20 >>> =46rom quick testing, I see a problem: >>>=20 >>> . 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=E2=80=99ll need to look at how cc-mode fill comments. >> >>>=20 >>> 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=E2=80=99t 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