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.devel Subject: Re: master 5ecd35555e9: Fix c-ts-common filling Date: Tue, 6 Aug 2024 21:56:26 -0700 Message-ID: <85B721AC-05BB-4744-A3E9-5EC9A167DB8E@gmail.com> References: <172282980799.32577.17823414050456920@vcs2.savannah.gnu.org> <20240805035008.C71C3C0EFEE@vcs2.savannah.gnu.org> <87cymlnn22.fsf@yahoo.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) 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="5889"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Devel To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 07 06:57:25 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sbYjl-0001PV-1K for ged-emacs-devel@m.gmane-mx.org; Wed, 07 Aug 2024 06:57:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbYj5-0005V1-D7; Wed, 07 Aug 2024 00:56:43 -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 1sbYj4-0005Up-Ga for emacs-devel@gnu.org; Wed, 07 Aug 2024 00:56:42 -0400 Original-Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbYj2-0003Vt-Qw for emacs-devel@gnu.org; Wed, 07 Aug 2024 00:56:42 -0400 Original-Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1ff67158052so10221615ad.0 for ; Tue, 06 Aug 2024 21:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723006598; x=1723611398; darn=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=fWcOKv9pC4+Ujvrtptdc1pJBp1cE78vS18WeNJl1Djo=; b=Vh++7JZ53WoX3ombRMNWz2wmDG53zDW1T0jCJovSzFFvJym4kSmpctsFuPUDcuU/3L juitxIxzqd7FlDLY6rO6KddBd5MyqFKnPq0z3HSJ0zOPyc5B04uDtXOErG8tN9CNdYi8 P1KBK6Q/k+YAQ6uKP0DL7DrfOMQu/C29GlRGf6+zDH0CLA+a1THSMmrvX+ublUkObq+r m36wYytxjJhiOZNIi+qXNdBPIzas37E/fN53hHhhfLr2yDBUIfuuEA0xJCYKtKp5Excl HmOJxT32TExyQhraL7+eyp2Lb01SprojnOt5uGGYtLaCpEXrg4JV2LqwA/U6wa+LM3f4 TjOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723006598; x=1723611398; 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=fWcOKv9pC4+Ujvrtptdc1pJBp1cE78vS18WeNJl1Djo=; b=VDlV8+Jt1ZQE3Vk+wHenlKD+YfrPPHr04Y43CTkp7axbnCE70e5B0af90Yp7Bj5/xs SsGUUrpIOBtgDJ0U6bpE/EckqSprh5pYnQtN0reqAtFtd8IY9noRCZf/ZWfnjYyqOYzK CtTYqIbXoe3jvMHuNjxeD8eqgd1LOt7MznMtztaowh6Y0fAjC29pCuIo5DDPWTA3IHyv CeVddFmCB1IV7BzEIilOPENH/KzW9lrx1VIB5YaIk7R9B5NS6vBxqx9wASovyCk3L6bs F0eGCe3jfINEcLr0Ei2rtfB5z1HzHJfkm+MHlduJvwzpB88jP8MvR4XXxehglwB8xEeH WG7A== X-Gm-Message-State: AOJu0YzDmFd7OH6SNdYctVX4VP1twjxRe2WAcpRkVtavlHube0GBwxsF jBjWIwRxbE7g26d4GpQoWh7MhmrB/82gElfMAO7n6Gw37uv4+TJA X-Google-Smtp-Source: AGHT+IE1ggawIF/kW88Il+80MInbbrJhFWDUclo2Jr7kWLc/Bn8UvluzcNx1OcC5Nv1Vdp1lqSko1g== X-Received: by 2002:a17:903:2288:b0:1fc:f65:cd8a with SMTP id d9443c01a7336-1ff57281ef3mr167562185ad.18.1723006598212; Tue, 06 Aug 2024 21:56:38 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:313a:c2af:d5cc:6671]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ff58f5a968sm96592795ad.109.2024.08.06.21.56.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Aug 2024 21:56:37 -0700 (PDT) In-Reply-To: <87cymlnn22.fsf@yahoo.com> X-Mailer: Apple Mail (2.3774.600.62) Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=casouri@gmail.com; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322477 Archived-At: > On Aug 6, 2024, at 6:23=E2=80=AFPM, Po Lu wrote: >=20 > Yuan Fu writes: >=20 >> branch: master >> commit 5ecd35555e9e20de9717f0184f58a15d8a2e68a3 >> Author: Yuan Fu >> Commit: Yuan Fu >>=20 >> Fix c-ts-common filling >>=20 >> * lisp/progmodes/c-ts-common.el: >> (c-ts-common--fill-block-comment): Exclude the last line from = filling if >> it only has non-word characters like *=3D-. >> * test/lisp/progmodes/c-ts-mode-resources/filling.erts: Fir the >> multi-line test and add a single line test. >> --- >> lisp/progmodes/c-ts-common.el | 6 +++--- >> test/lisp/progmodes/c-ts-mode-resources/filling.erts | 16 = +++++++++++++++- >> 2 files changed, 18 insertions(+), 4 deletions(-) >>=20 >> diff --git a/lisp/progmodes/c-ts-common.el = b/lisp/progmodes/c-ts-common.el >> index 022d21e11a1..674623a5e61 100644 >> --- a/lisp/progmodes/c-ts-common.el >> +++ b/lisp/progmodes/c-ts-common.el >> @@ -186,9 +186,9 @@ comment." >> ;; filling region. >> (when (not end-marker) >> (goto-char end) >> - (when (looking-back (rx "*/") 2) >> - (backward-char 2) >> - (skip-syntax-backward "-") >> + (forward-line 0) >> + (when (looking-at (rx (* (or (syntax whitespace) "*" "=3D" = "-")) >> + "*/" eol)) >> (setq end (point)))) >=20 > This (and connected changes) produced merge conflicts between emacs-30 > and master, which I have attempted to resolve so that the product > builds, but since I must confess to understanding very little of this > code, please verify that no regressions were introduced in the = process. Yes, sorry for the trouble. Your change is correct! Yuan=