From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: Scan of regexps in Emacs (March 17) Date: Wed, 20 Mar 2019 11:04:50 +0100 Message-ID: <8FD6CD65-D02A-4DAE-B2D6-8D83F23F3930@acm.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 (Mac OS X Mail 12.2 \(3445.102.3\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="8927"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 20 11:11:45 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 1h6YCE-0002C1-Un for ged-emacs-devel@m.gmane.org; Wed, 20 Mar 2019 11:11:43 +0100 Original-Received: from localhost ([127.0.0.1]:45446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6YCD-0003HK-Rj for ged-emacs-devel@m.gmane.org; Wed, 20 Mar 2019 06:11:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6YBs-0003C9-Sa for emacs-devel@gnu.org; Wed, 20 Mar 2019 06:11:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6Y5r-0001HG-5o for emacs-devel@gnu.org; Wed, 20 Mar 2019 06:05:07 -0400 Original-Received: from mail152c50.megamailservers.eu ([91.136.10.162]:41570 helo=mail50c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h6Y5q-0001CU-DG for emacs-devel@gnu.org; Wed, 20 Mar 2019 06:05:07 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1553076292; bh=jPjhQsVQJ/vcxS5BPRQvwMQNpJ5slRCk1tqiGEy4A9o=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=VqfOiS2KKD1EOdX6OWt71Px48EyfgR3Jo/ZlNgqMSPF51A8AS/T5u/guGD6RmLrt4 xhY1wgJi2WlyN7acWNkdKtZVXKfOXJa0pjgA9uefiKor3tH0QUqU471ydgqZva8pAs X8S5MSrOIHuMAwReoKd0LmHV3EQYp4VxNp7h1G/c= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail50c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x2KA4ocK026892; Wed, 20 Mar 2019 10:04:52 +0000 In-Reply-To: <3974269b-6cad-0744-bd1f-66c067f94192@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.102.3) X-CTCH-RefID: str=0001.0A0B0207.5C921044.00BB, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=a4UeC3aF c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=tBMGWhLKKe0LdDW4uyYA:9 a=CjuIK1q_8ugA:10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 91.136.10.162 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:234397 Archived-At: 20 mars 2019 kl. 02.53 skrev Paul Eggert : >=20 > Thanks for proofreading that. I installed the attached to try to fix = the problems you noted. That looks fine. You found more skip-chars-* rubbish to clean up, good! = Turn any stone... > I also fixed a couple of other problems if I happened to run across = them. First, the regexp [a-b-c] is ambiguous according to POSIX, and = should be avoided. Second, a regexp like [[:alnum:]-z] is also ambiguous = for the same reason. Perhaps these regexps currently have a particular = behavior in Emacs but it's not documented as far as I know and code = should avoid them. Perhaps the trawler could be modified to catch them. Right, the rules are muddy; they had to be reverse-engineered for xr. I = was a bit disappointed not to find any [a-[:alnum:]] anywhere though; = that would have been a sight. I'll see what can be done -- it's always a matter of balance to avoid = false positives. By the way, my little diatribe about format arguments led to a = mechanised search for argument count violations. One found, in eshell, = pushed to master as obvious: diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 55251f5bfb..3432582cf4 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -498,7 +498,7 @@ See the variable `eshell-kill-processes-on-exit'." (buffer-name)))) (eshell-round-robin-kill (if (eq eshell-kill-processes-on-exit 'every) - (format-message "Kill Eshell child process `%s'? ")))) + "Kill Eshell child process `%s'? "))) (let ((buf (get-buffer "*Process List*"))) (if (and buf (buffer-live-p buf)) (kill-buffer buf)))