[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]
From: |
Mattias Engdegård |
Subject: |
bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]] |
Date: |
Tue, 11 Jun 2019 18:31:38 +0200 |
11 juni 2019 kl. 17.37 skrev Paul Eggert <eggert@cs.ucla.edu>:
>
> No, it's basically the same thing; we're looking for any place that
> [:xdigit:] would be useful in clarifying patterns intended to max hexadecimal
> digits (and perhaps some other things). Also, the skip-chars arguments are
> also the same thing. Let's do all these.
Since you asked, I've attached a relint run with xr modified to find parts of
character alternatives and skip-sets that could be replaced with [:xdigit:], on
Emacs .el files in master; it was quick work.
However, I'm not really convinced that the risks of making mistakes in the
translation would outweigh the benefits. We could make an automatic
verification, but [0-9A-Fa-f] still has one advantage: the reader, and the
writer, know exactly which characters are included without looking it up. For
example:
- whether upper case, lower case, or both are accepted
- whether non-ascii digits are accepted (included in [:digit:] on many
platforms)
But it's not up to me; should your judgement tell you otherwise, go ahead! I
don't mind the use of [:xdigit:] at all, it's just the wholesale replacement.
xdigit.log
Description: Binary data
- bug#36167: [PATCH] Replace [0-9a-fA-F] with [[:xdigit:]], (continued)
- bug#36167: [PATCH] Replace [0-9a-fA-F] with [[:xdigit:]], Lars Ingebrigtsen, 2019/06/12
- bug#36167: [PATCH] Replace [0-9a-fA-F] with [[:xdigit:]], Lars Ingebrigtsen, 2019/06/12
- bug#36167: [PATCH] Replace [0-9a-fA-F] with [[:xdigit:]], Andreas Schwab, 2019/06/12
- bug#36167: [PATCH] Replace [0-9a-fA-F] with [[:xdigit:]], Lars Ingebrigtsen, 2019/06/12
- bug#36167: [PATCH] Replace [0-9a-fA-F] with [[:xdigit:]], Konstantin Kharlamov, 2019/06/12
- bug#36167: [PATCH] Replace [0-9a-fA-F] with [[:xdigit:]], npostavs, 2019/06/11
- bug#36167: [PATCH] Replace [0-9a-fA-F] with [[:xdigit:]], Eli Zaretskii, 2019/06/11
bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Paul Eggert, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Konstantin Kharlamov, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Paul Eggert, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]],
Mattias Engdegård <=
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Drew Adams, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Eli Zaretskii, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Drew Adams, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Eli Zaretskii, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Paul Eggert, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Eli Zaretskii, 2019/06/11
bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], npostavs, 2019/06/11
bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Eli Zaretskii, 2019/06/11
bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Eli Zaretskii, 2019/06/11
bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Drew Adams, 2019/06/11