From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#43558: [PATCH]: Fix (forward-comment 1) when end delimiter is escaped. Date: Tue, 22 Sep 2020 19:41:10 +0000 Message-ID: <20200922194110.GD26819@ACM> References: <20200922093550.GA26819@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27230"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43558@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 22 21:42:11 2020 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 1kKoB0-0006yd-7K for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Sep 2020 21:42:10 +0200 Original-Received: from localhost ([::1]:56572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKoAz-0004nM-4q for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Sep 2020 15:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKoAs-0004nF-7M for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 15:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kKoAr-00036h-UB for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 15:42:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kKoAr-0008CV-Rf for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 15:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Sep 2020 19:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43558 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160080367831472 (code B ref -1); Tue, 22 Sep 2020 19:42:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Sep 2020 19:41:18 +0000 Original-Received: from localhost ([127.0.0.1]:33455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKoAA-0008BX-Ge for submit@debbugs.gnu.org; Tue, 22 Sep 2020 15:41:18 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:51226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKoA9-0008BQ-1a for submit@debbugs.gnu.org; Tue, 22 Sep 2020 15:41:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKoA8-0004kK-QW for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 15:41:16 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:40298 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1kKoA6-00033V-QT for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 15:41:16 -0400 Original-Received: (qmail 77892 invoked by uid 3782); 22 Sep 2020 19:41:12 -0000 Original-Received: from acm.muc.de (p4fe15d08.dip0.t-ipconnect.de [79.225.93.8]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Tue, 22 Sep 2020 21:41:11 +0200 Original-Received: (qmail 1174 invoked by uid 1000); 22 Sep 2020 19:41:10 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/22 15:41:12 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:188742 Archived-At: Hello, Stefan. On Tue, Sep 22, 2020 at 10:09:43 -0400, Stefan Monnier wrote: > Hi Alan, > > Hello, Emacs and Stefan. > > In the following C comment: > > 1 /* > > 2 \*/ > > 3 /**/ > > , with point at BOL 1, do M-: (forward-comment 1). This leaves point > > wrongly at EOL 2. > That seems to be correct w.r.t the highlighting I see, OTOH. > IOW the bug seems to affect both forward-comment and parse-partial-sexp, right? Yes. > > It should end up at EOL 3, since the apparent comment > > ender on L2 is actually escaped. > > The following patch fixes this. > Does it fix it for `parse-partial-sexp` as well? It does, yes. The patch is in forw_comment, which is called by Fforward_comment, scan_lists, and scan_sexps_forward. > > Are there any objections to me installing it? > None from me, no. Thanks! > Stefan -- Alan Mackenzie (Nuremberg, Germany).