From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Scan of regexps in Emacs (March 17) Date: Wed, 20 Mar 2019 20:57:41 -0400 Message-ID: References: <5363970c-3207-1bb4-8b30-74a7d12277cc@cs.ucla.edu> <05269D79-B016-4FCB-94B8-068BF7D1C2D2@acm.org> <3974269b-6cad-0744-bd1f-66c067f94192@cs.ucla.edu> <4b1164c4-e302-ce41-07c3-145d31a97b4c@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="85326"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Mattias =?windows-1252?Q?Engdeg=E5rd?= , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 21 01:59:12 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 1h6m35-000M6S-UG for ged-emacs-devel@m.gmane.org; Thu, 21 Mar 2019 01:59:12 +0100 Original-Received: from localhost ([127.0.0.1]:57524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6m34-00045a-QZ for ged-emacs-devel@m.gmane.org; Wed, 20 Mar 2019 20:59:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6m1m-00043j-BJ for emacs-devel@gnu.org; Wed, 20 Mar 2019 20:57:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6m1k-0002QE-2Z for emacs-devel@gnu.org; Wed, 20 Mar 2019 20:57:49 -0400 Original-Received: from mail01.iro.umontreal.ca ([132.204.25.201]:51634) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h6m1i-0002EC-0e for emacs-devel@gnu.org; Wed, 20 Mar 2019 20:57:47 -0400 Original-Received: from mail01.iro.umontreal.ca (mail01.iro.umontreal.ca [127.0.0.1]) by mail01.iro.umontreal.ca (Postfix) with ESMTP id F174780FD605 for ; Wed, 20 Mar 2019 20:57:43 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; h=content-type:content-type:mime-version:user-agent:in-reply-to :date:date:references:message-id:subject:subject:to:from:from; s=dkim; t=1553129863; x=1553993864; bh=Q1+Kw96hS844okGUgZp5Fn9+ tfQQW/xx3BLg+cuoOdU=; b=ZJV4xrSwz2XNCOV50pcUXVYd0dWsfFxEPP1o5ZGu JTx2l0r5GEZCknjzPWeXpilFLuHF02jK57MeIgFntJu/owJhky/a7bM2vgOz61Ty CaG8h4K/sSoRPeC3h1Y1Lh7HUWoHARzlcjOflKXY+0R2WF2yw0yR9QjfEPKDp4Md pMzobbxA2V/HCDfAApVe6j0lEut/sIiksBMtiF/R8M+3pNgQ0Hjh6rz2f7nqdjXe YY+0md94tx0eFZmrWdXaNXDxjPUc4JDSyt4xkc0f4NRelimBTounxYLQPeMrDH0g apBk3sapp8+8pUA6oBS7ZQv5vtNhDN05HtHEsYDvcJGqfg== X-Virus-Scanned: amavisd-new at iro.umontreal.ca Original-Received: from mail01.iro.umontreal.ca ([127.0.0.1]) by mail01.iro.umontreal.ca (mail01.iro.umontreal.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b56sFTgEr0qF for ; Wed, 20 Mar 2019 20:57:43 -0400 (EDT) Original-Received: from pastel (75-119-242-252.dsl.teksavvy.com [75.119.242.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6C59780FD5EE; Wed, 20 Mar 2019 20:57:42 -0400 (EDT) In-Reply-To: <4b1164c4-e302-ce41-07c3-145d31a97b4c@cs.ucla.edu> (Paul Eggert's message of "Wed, 20 Mar 2019 15:01:51 -0700") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.201 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:234438 Archived-At: >> I wonder why the doc doesn't just say that `-` should be the last >> character and not mention the other possibilities which just make the >> rule unnecessarily complex. > '-' can also be the first character in a regular expression; this is > pretty common and is standard. What I meant is that we should simply tell people to always put it at the end. AFAIK you can always put it at the end, so it's a simpler rule to follow. That doesn't mean we have to reject a `-` in other positions (so we can also accept the usual other rule, but we don't need to advertise it as much as the main rule). Stefan