From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Questionable code in handling of wordend in the regexp engine in regex-emacs.c Date: Tue, 05 Mar 2019 18:26:07 +0200 Message-ID: <83tvghcmow.fsf@gnu.org> References: <834l8mirj9.fsf@gnu.org> <20190301145856.GE5674@ACM> <83zhqeh8ds.fsf@gnu.org> <20190301163824.GF5674@ACM> <20190301191607.GG5674@ACM> <83woligzmu.fsf@gnu.org> <20190302111640.GA21061@ACM> <83fts5h3lz.fsf@gnu.org> <20190302131801.GB21061@ACM> <83lg1ueel6.fsf@gnu.org> <20190305105150.GA4850@ACM> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="266109"; mail-complaints-to="usenet@blaine.gmane.org" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 05 17:26:23 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1CtZ-00175s-TL for ged-emacs-devel@m.gmane.org; Tue, 05 Mar 2019 17:26:22 +0100 Original-Received: from localhost ([127.0.0.1]:45360 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1CtY-0004wx-Rj for ged-emacs-devel@m.gmane.org; Tue, 05 Mar 2019 11:26:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1CtS-0004wl-Bw for emacs-devel@gnu.org; Tue, 05 Mar 2019 11:26:15 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52409) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1CtO-0007dA-5N; Tue, 05 Mar 2019 11:26:10 -0500 Original-Received: from [176.228.60.248] (port=3802 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h1CtN-0007JG-Ir; Tue, 05 Mar 2019 11:26:10 -0500 In-reply-to: <20190305105150.GA4850@ACM> (message from Alan Mackenzie on Tue, 5 Mar 2019 10:51:50 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233852 Archived-At: > Date: Tue, 5 Mar 2019 10:51:50 +0000 > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > From: Alan Mackenzie > > > I see 2 possible ways to handle this: (1) remove the assertion for > > good, or (2) change buf_bytepos_to_charpos to accept one more > > argument, telling it whether to make this check, and then modify all > > the callers except those in set_intervals_multibyte_1 to pass 'true' > > as that argument. > > > Thoughts? > > First of all, sorry I wasn't here yesterday to deal with it. No sweat: since this popped up in my own build, it was very easy to understand the reasons. > I don't think I like alternative (2) - it's ugly, and how much do we > really need this eassert anyway? It's turned out not to be such a good > idea after all. I would favour alternative (1), just removing the thing > altogether. Agreed; done. Thanks.