From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: Scan of regexps in Emacs (March 17) Date: Fri, 22 Mar 2019 05:26:06 -0800 Message-ID: <86bm23f3bl.fsf@stephe-leake.org> References: <5363970c-3207-1bb4-8b30-74a7d12277cc@cs.ucla.edu> <05269D79-B016-4FCB-94B8-068BF7D1C2D2@acm.org> <3974269b-6cad-0744-bd1f-66c067f94192@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="150332"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 22 14:53:38 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 1h7Kc6-000czK-00 for ged-emacs-devel@m.gmane.org; Fri, 22 Mar 2019 14:53:38 +0100 Original-Received: from localhost ([127.0.0.1]:57758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7Kc5-00039A-0l for ged-emacs-devel@m.gmane.org; Fri, 22 Mar 2019 09:53:37 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7Kbn-00037S-RI for emacs-devel@gnu.org; Fri, 22 Mar 2019 09:53:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h7Kbm-0004cB-Ng for emacs-devel@gnu.org; Fri, 22 Mar 2019 09:53:19 -0400 Original-Received: from gproxy8-pub.mail.unifiedlayer.com ([67.222.33.93]:56067) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h7Kbm-0004Xh-Aw for emacs-devel@gnu.org; Fri, 22 Mar 2019 09:53:18 -0400 Original-Received: from cmgw10.unifiedlayer.com (unknown [10.9.0.10]) by gproxy8.mail.unifiedlayer.com (Postfix) with ESMTP id AD8101AC36B for ; Fri, 22 Mar 2019 07:26:12 -0600 (MDT) Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmsmtp with ESMTP id 7KBYhMQuWuj2o7KBYhLuxc; Fri, 22 Mar 2019 07:26:12 -0600 X-Authority-Reason: nr=8 X-Authority-Analysis: $(_cmae_reason Original-Received: from [76.77.182.20] (port=54475 helo=Takver4) by host114.hostmonster.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1h7KBY-001vi5-F9 for emacs-devel@gnu.org; Fri, 22 Mar 2019 07:26:12 -0600 In-Reply-To: (Stefan Monnier's message of "Tue, 19 Mar 2019 22:20:53 -0400") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host114.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1h7KBY-001vi5-F9 X-Source-Sender: (Takver4) [76.77.182.20]:54475 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 1 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDExNC5ob3N0bW9uc3Rlci5jb20= X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 67.222.33.93 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:234563 Archived-At: Stefan Monnier writes: > 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. I recently ran into a problem with this; I had a regexp with `-' at the end, then edited it to add another range, without noticing the trailing `-': before: [0-9a-zA-Z_-] after: [0-9a-zA-Z_-\x80-\U0010FFFF] This is _not_ what I wanted. So putting it first is better. It does not conflict with putting `]' first; []-...] is unambiguous. -- -- Stephe