From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]] Date: Tue, 11 Jun 2019 17:37:54 +0300 Message-ID: <1560263874.21373.1@yandex.ru> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="210185"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 36167@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 11 16:42:39 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hahyx-000sXg-5k for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jun 2019 16:42:39 +0200 Original-Received: from localhost ([::1]:59782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hahyw-0001jB-5W for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jun 2019 10:42:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43124) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hahvb-00072b-Vx for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2019 10:39:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hahvY-0001GH-Fp for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2019 10:39:11 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46410) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hahvR-0001Db-QJ for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2019 10:39:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hahvR-0006aA-Lz for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2019 10:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jun 2019 14:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36167 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36167-submit@debbugs.gnu.org id=B36167.156026388925211 (code B ref 36167); Tue, 11 Jun 2019 14:39:01 +0000 Original-Received: (at 36167) by debbugs.gnu.org; 11 Jun 2019 14:38:09 +0000 Original-Received: from localhost ([127.0.0.1]:59939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hahub-0006YX-6D for submit@debbugs.gnu.org; Tue, 11 Jun 2019 10:38:09 -0400 Original-Received: from forward105j.mail.yandex.net ([5.45.198.248]:35177) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hahuW-0006Xl-V6 for 36167@debbugs.gnu.org; Tue, 11 Jun 2019 10:38:06 -0400 Original-Received: from mxback2j.mail.yandex.net (mxback2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10b]) by forward105j.mail.yandex.net (Yandex) with ESMTP id 5BBFFB2189E; Tue, 11 Jun 2019 17:37:57 +0300 (MSK) Original-Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id O7EQ88cvVH-bu6alv9M; Tue, 11 Jun 2019 17:37:57 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1560263877; bh=0F229/LM0UwMP1j42y8UPwfa2uhLR9Rk+WhvSU9R9yQ=; h=In-Reply-To:Cc:To:Subject:From:References:Date:Message-Id; b=SIajH8KeuAJ3h9KEdvYPZpZUhyclF2WSKiHllg9AFhGHoDL3lH1kUfz7BxDjUGN+q Bx0DWBCdf/SwL1BcnQG2vbVfGg2iMiEGVMXpFfoL5Sv0nhDK7HeG2k5Zwr2uOENiVh KrCgtRDeLvH7tPs/RsKP8CNAc6NZTq5KkoshZcu4= Authentication-Results: mxback2j.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nbCD8vlSZp-buKidnxL; Tue, 11 Jun 2019 17:37:56 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) In-Reply-To: X-Mailer: geary/3.33.1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:160373 Archived-At: On =D0=92=D1=82, =D0=B8=D1=8E=D0=BD 11, 2019 at 07:26, Paul Eggert =20 wrote: > If we're going to make such a change we should be systematic about=20 > it. Unfortunately the currently-proposed patches don't handle=20 > examples like these: >=20 > [A-Fa-f0-9] (in dnd.el) >=20 > [0-9a-fA-F.] (in org/org-table.el) >=20 > [0-9a-fA-FxXzZ_] (in progmodes/vera-mode.el) This one doesn't look like hex. At least :xdigit: sure doesn't match X=20 and Z. Although this probably could be replaced with [[[:digit:]]xXzZ]=20 (didn't test this one). But I imagine such change may better be a=20 separate patch, as it's somewhat different from all the other changes. > (skip-chars-backward "0-9a-fA-F'") (in progmodes/cc-mode.el) Same here. > I will cc this message to Mattias Engdeg=C3=A5rd, as he has a good=20 > scanner for regular expressions and patterns. Mattias, the bug-report=20 > thread is here: >=20 > https://debbugs.gnu.org/36167 Either way, thanks, I already figured too that there are some regexes=20 in a different order. I'm using ack to find them, this should work: ack "\[[-09afAF]{9}\]" I'll post an updated patch later. =