|
From: | Konstantin Kharlamov |
Subject: | bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]] |
Date: | Tue, 11 Jun 2019 17:37:54 +0300 |
On Вт, июн 11, 2019 at 07:26, Paul Eggert <eggert@cs.ucla.edu> wrote:
If we're going to make such a change we should be systematic about it. Unfortunately the currently-proposed patches don't handle examples like these:[A-Fa-f0-9] (in dnd.el) [0-9a-fA-F.] (in org/org-table.el) [0-9a-fA-FxXzZ_] (in progmodes/vera-mode.el)
This one doesn't look like hex. At least :xdigit: sure doesn't match X and Z. Although this probably could be replaced with [[[:digit:]]xXzZ] (didn't test this one). But I imagine such change may better be a 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ård, as he has a good scanner for regular expressions and patterns. Mattias, the bug-report thread is here:https://debbugs.gnu.org/36167
Either way, thanks, I already figured too that there are some regexes in a different order. I'm using ack to find them, this should work:
ack "\[[-09afAF]{9}\]" I'll post an updated patch later.
[Prev in Thread] | Current Thread | [Next in Thread] |