all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
@ 2019-06-11 11:59 Konstantin Kharlamov
  2019-06-11 14:26 ` Paul Eggert
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Konstantin Kharlamov @ 2019-06-11 11:59 UTC (permalink / raw)
  To: 36167

Hopefully, this is more readable compared to older "[0-9a-fA-F]", 
because the intention is immediately obvious.

Fun fact: initially I started it because on my older Emacs this 
resulted in better performance; the difference was about 10x times. But 
I can't reproduce this on the current master anymore, i.e. the 
performance matches. Oh, well. I'm thus not sending the patch replacing 
[0-9] with [[:digit:]] because in terms of readability the intention is 
clear there, however replacing the hex regexes should still make code 
more readable.

P.S.: I'm not sure if the commit message looks okay, comments are 
welcome.







^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 11:59 Konstantin Kharlamov
@ 2019-06-11 14:26 ` Paul Eggert
  2019-06-11 14:37   ` Konstantin Kharlamov
  2019-06-11 19:56 ` Andy Moreton
  2019-06-12 11:44 ` Andy Moreton
  2 siblings, 1 reply; 19+ messages in thread
From: Paul Eggert @ 2019-06-11 14:26 UTC (permalink / raw)
  To: Konstantin Kharlamov; +Cc: Mattias Engdegård, 36167

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)

(skip-chars-backward "0-9a-fA-F'") (in progmodes/cc-mode.el)

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






^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 14:26 ` Paul Eggert
@ 2019-06-11 14:37   ` Konstantin Kharlamov
  2019-06-11 15:37     ` Paul Eggert
  0 siblings, 1 reply; 19+ messages in thread
From: Konstantin Kharlamov @ 2019-06-11 14:37 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Mattias Engdegård, 36167



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.







^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 14:37   ` Konstantin Kharlamov
@ 2019-06-11 15:37     ` Paul Eggert
  2019-06-11 16:31       ` Mattias Engdegård
  0 siblings, 1 reply; 19+ messages in thread
From: Paul Eggert @ 2019-06-11 15:37 UTC (permalink / raw)
  To: Konstantin Kharlamov; +Cc: Mattias Engdegård, 36167

On 6/11/19 7:37 AM, Konstantin Kharlamov wrote:
> this probably could be replaced with [[[:digit:]]xXzZ] (didn't test 
> this one).

That's right, though it should be [[:xdigit:]xXzZ].

> But I imagine such change may better be a separate patch, as it's 
> somewhat different from all the other changes.

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.






^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 15:37     ` Paul Eggert
@ 2019-06-11 16:31       ` Mattias Engdegård
  2019-06-11 16:50         ` Drew Adams
  0 siblings, 1 reply; 19+ messages in thread
From: Mattias Engdegård @ 2019-06-11 16:31 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 36167, Konstantin Kharlamov

[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]

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.


[-- Attachment #2: xdigit.log --]
[-- Type: application/octet-stream, Size: 47618 bytes --]

; -*- compilation -*-
lisp/calc/calc-aent.el:731:41: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 6)
  "0[xX][0-9a-fA-F]+"
   ......^
lisp/calc/calc-ext.el:3022:24: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 9)
  "^0[xX]\\([0-9a-fA-F]+\\)$"
   ..........^
lisp/calc/calc-ext.el:3028:24: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 6)
  "^\\$\\([0-9a-fA-F]+\\)$"
   ........^
lisp/calc/calc-lang.el:246:14: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 5)
  "\\(\\$[0-9a-fA-F]+\\)\\($\\|[^0-9a-zA-Zα-ωΑ-Ω]\\)"
   .......^
lisp/cedet/semantic/java.el:40:3: In semantic-java-number-regexp: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 203)
  "\\(\\<[0-9]+[.][0-9]+\\([eE][-+]?[0-9]+\\)?[fFdD]?\\>\\|\\<[0-9]+[.][eE][-+]?[0-9]+[fFdD]?\\>\\|\\<[0-9]+[.][fFdD]\\>\\|\\<[0-9]+[.]\\|[.][0-9]+\\([eE][-+]?[0-9]+\\)?[fFdD]?\\>\\|\\<[0-9]+[eE][-+]?[0-9]+[fFdD]?\\>\\|\\<0[xX][0-9a-fA-F]+[lL]?\\>\\|\\<[0-9]+[lLfFdD]?\\>\\)"
   .................................................................................................................................................................................................................................^
lisp/cedet/semantic/lex.el:1301:3: In call to define-lex-simple-regex-analyzer: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 203)
  "\\(\\<[0-9]+[.][0-9]+\\([eE][-+]?[0-9]+\\)?[fFdD]?\\>\\|\\<[0-9]+[.][eE][-+]?[0-9]+[fFdD]?\\>\\|\\<[0-9]+[.][fFdD]\\>\\|\\<[0-9]+[.]\\|[.][0-9]+\\([eE][-+]?[0-9]+\\)?[fFdD]?\\>\\|\\<[0-9]+[eE][-+]?[0-9]+[fFdD]?\\>\\|\\<0[xX][0-9a-fA-F]+[lL]?\\>\\|\\<[0-9]+[lLfFdD]?\\>\\)"
   .................................................................................................................................................................................................................................^
lisp/cedet/semantic/lex.el:1923:28: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 203)
  "\\(\\<[0-9]+[.][0-9]+\\([eE][-+]?[0-9]+\\)?[fFdD]?\\>\\|\\<[0-9]+[.][eE][-+]?[0-9]+[fFdD]?\\>\\|\\<[0-9]+[.][fFdD]\\>\\|\\<[0-9]+[.]\\|[.][0-9]+\\([eE][-+]?[0-9]+\\)?[fFdD]?\\>\\|\\<[0-9]+[eE][-+]?[0-9]+[fFdD]?\\>\\|\\<0[xX][0-9a-fA-F]+[lL]?\\>\\|\\<[0-9]+[lLfFdD]?\\>\\)"
   .................................................................................................................................................................................................................................^
lisp/emulation/cua-rect.el:1130:30: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 5)
  "0x\\([0-9a-fA-F]+\\)"
   ......^
lisp/gnus/mml-sec.el:728:33: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 10)
  "\\(0x\\)?\\([0-9a-fA-F]\\{8,\\}\\)"
   .............^
lisp/gnus/nneething.el:300:26: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 4)
  "%\\([0-9a-fA-F][0-9a-fA-F]\\)"
   .....^
lisp/gnus/nneething.el:300:26: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 15)
  "%\\([0-9a-fA-F][0-9a-fA-F]\\)"
   ................^
lisp/international/mule-cmds.el:3082:29: In call to string-match-p: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 3)
  "\\`[0-9a-fA-F]+\\'"
   ....^
lisp/mail/rfc2231.el:226:33: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 4)
  "%\\([0-9A-Fa-f][0-9A-Fa-f]\\)"
   .....^
lisp/mail/rfc2231.el:226:33: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 15)
  "%\\([0-9A-Fa-f][0-9A-Fa-f]\\)"
   ................^
lisp/net/shr-color.el:238:8: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 4)
  "\\(#[0-9a-fA-F]\\{3\\}[0-9a-fA-F]\\{3\\}?\\)"
   .....^
lisp/net/shr-color.el:238:8: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 20)
  "\\(#[0-9a-fA-F]\\{3\\}[0-9a-fA-F]\\{3\\}?\\)"
   .......................^
lisp/nxml/nxml-maint.el:37:33: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 6)
  "^ *\\([a-fA-F0-9]\\{2\\}\\)[ \t]+"
   .......^
lisp/nxml/nxml-maint.el:40:37: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 3)
  "\\([a-fA-F0-9]\\{2\\}\\)-\\([a-fA-F0-9]\\{2\\}\\)\\|\\([a-fA-F0-9]\\{2\\}\\)"
   ....^
lisp/nxml/nxml-maint.el:40:37: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 24)
  "\\([a-fA-F0-9]\\{2\\}\\)-\\([a-fA-F0-9]\\{2\\}\\)\\|\\([a-fA-F0-9]\\{2\\}\\)"
   .............................^
lisp/nxml/nxml-maint.el:40:37: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 46)
  "\\([a-fA-F0-9]\\{2\\}\\)-\\([a-fA-F0-9]\\{2\\}\\)\\|\\([a-fA-F0-9]\\{2\\}\\)"
   ........................................................^
lisp/nxml/rng-cmpct.el:372:31: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 8)
  "\\\\x+{\\([0-9a-fA-F]+\\)}"
   ...........^
lisp/nxml/rng-uri.el:71:25: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 14)
  "\\`\\(?:[^%]\\|%[0-9a-fA-F]{2}\\)*\\'"
   .................^
lisp/nxml/rng-uri.el:302:29: In call to replace-regexp-in-string: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 16)
  "\\(?:%[89a-fA-F][0-9a-fA-F]\\)+"
   .................^
lisp/nxml/rng-uri.el:313:29: In call to replace-regexp-in-string: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 7)
  "%[0-7][0-9a-fA-F]"
   .......^
lisp/nxml/rng-uri.el:321:29: In call to replace-regexp-in-string: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 7)
  "%[0-7][0-9a-fA-F]\\|[^%]"
   .......^
lisp/nxml/rng-uri.el:336:4: In call to replace-regexp-in-string: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 7)
  "%[0-7][0-9a-fA-F]\\|[^%]"
   .......^
lisp/nxml/rng-xsd.el:333:22: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 16)
  "\\`[ \r\n\t]*\\(\\(?:[0-9A-Fa-f][0-9A-Fa-f]\\)*\\)[ \r\n\t]*\\'"
   ......................^
lisp/nxml/rng-xsd.el:333:22: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 27)
  "\\`[ \r\n\t]*\\(\\(?:[0-9A-Fa-f][0-9A-Fa-f]\\)*\\)[ \r\n\t]*\\'"
   .................................^
lisp/nxml/rng-xsd.el:363:22: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 14)
  "\\`\\(?:[^%]\\|%[0-9a-fA-F][0-9a-fA-F]\\)*\\'"
   .................^
lisp/nxml/rng-xsd.el:363:22: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 25)
  "\\`\\(?:[^%]\\|%[0-9a-fA-F][0-9a-fA-F]\\)*\\'"
   ............................^
lisp/nxml/xsd-regexp.el:705:31: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 4)
  "^\\([0-9A-Fa-f]*\\);[^;]*;\\([A-Z][a-z]\\);"
   .....^
lisp/org/org-mobile.el:475:29: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 1)
  "[a-fA-F0-9]\\{30,40\\}"
   .^
lisp/org/org-mobile.el:764:34: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 3)
  "\\([0-9a-fA-F]\\{30,\\}\\).*?mobileorg\\.org[ \t]*$"
   ....^
lisp/org/org-table.el:158:3: In org-table-number-regexp: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 60)
  "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%:]*\\|[<>]?[-+]?0[xX][0-9a-fA-F.]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$"
   ..............................................................^
lisp/progmodes/ada-mode.el:912:37: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 4)
  "\\(#[0-9a-fA-F]*#\\)"
   .....^
lisp/progmodes/ada-mode.el:1016:17: In call to looking-back: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 10)
  "\\([0-9]+#[0-9a-fA-F_]+\\)"
   ...........^
lisp/progmodes/ada-mode.el:5139:3: In ada-font-lock-keywords: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 10)
  "\\([0-9]+#[0-9a-fA-F_]+#\\)"
   ...........^
lisp/progmodes/cc-mode.el:1416:3: In c-maybe-quoted-number-head: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 14)
  "\\(0\\(\\([Xx]\\([0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*'?\\)?\\)\\|\\([Bb]\\([01]\\('[01]\\|[01]\\)*'?\\)?\\)\\|\\('[0-7]\\|[0-7]\\)*'?\\)\\|[1-9]\\('[0-9]\\|[0-9]\\)*'?\\)"
   ..................^
lisp/progmodes/cc-mode.el:1416:3: In c-maybe-quoted-number-head: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 28)
  "\\(0\\(\\([Xx]\\([0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*'?\\)?\\)\\|\\([Bb]\\([01]\\('[01]\\|[01]\\)*'?\\)?\\)\\|\\('[0-7]\\|[0-7]\\)*'?\\)\\|[1-9]\\('[0-9]\\|[0-9]\\)*'?\\)"
   .................................^
lisp/progmodes/cc-mode.el:1416:3: In c-maybe-quoted-number-head: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 41)
  "\\(0\\(\\([Xx]\\([0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*'?\\)?\\)\\|\\([Bb]\\([01]\\('[01]\\|[01]\\)*'?\\)?\\)\\|\\('[0-7]\\|[0-7]\\)*'?\\)\\|[1-9]\\('[0-9]\\|[0-9]\\)*'?\\)"
   ...............................................^
lisp/progmodes/cc-mode.el:1438:30: In call to skip-chars-backward: 0-9A-Fa-f in skip set could be [:xdigit:] (pos 0)
  "0-9a-fA-F'"
   ^
lisp/progmodes/cc-mode.el:1450:3: In c-maybe-quoted-number-tail: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 11)
  "\\(\\([xX']?[0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*\\)\\|\\([bB']?[01]\\('[01]\\|[01]\\)*\\)\\|\\('?[0-9]\\('[0-9]\\|[0-9]\\)*\\)\\)"
   .............^
lisp/progmodes/cc-mode.el:1450:3: In c-maybe-quoted-number-tail: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 25)
  "\\(\\([xX']?[0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*\\)\\|\\([bB']?[01]\\('[01]\\|[01]\\)*\\)\\|\\('?[0-9]\\('[0-9]\\|[0-9]\\)*\\)\\)"
   ............................^
lisp/progmodes/cc-mode.el:1450:3: In c-maybe-quoted-number-tail: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 38)
  "\\(\\([xX']?[0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*\\)\\|\\([bB']?[01]\\('[01]\\|[01]\\)*\\)\\|\\('?[0-9]\\('[0-9]\\|[0-9]\\)*\\)\\)"
   ..........................................^
lisp/progmodes/cc-mode.el:1470:3: In c-maybe-quoted-number: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 12)
  "\\(0\\(\\([Xx][0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*\\)\\|\\([Bb][01]\\('[01]\\|[01]\\)*\\)\\|\\('[0-7]\\|[0-7]\\)*\\)\\|[1-9]\\('[0-9]\\|[0-9]\\)*\\)"
   ...............^
lisp/progmodes/cc-mode.el:1470:3: In c-maybe-quoted-number: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 26)
  "\\(0\\(\\([Xx][0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*\\)\\|\\([Bb][01]\\('[01]\\|[01]\\)*\\)\\|\\('[0-7]\\|[0-7]\\)*\\)\\|[1-9]\\('[0-9]\\|[0-9]\\)*\\)"
   ..............................^
lisp/progmodes/cc-mode.el:1470:3: In c-maybe-quoted-number: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 39)
  "\\(0\\(\\([Xx][0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*\\)\\|\\([Bb][01]\\('[01]\\|[01]\\)*\\)\\|\\('[0-7]\\|[0-7]\\)*\\)\\|[1-9]\\('[0-9]\\|[0-9]\\)*\\)"
   ............................................^
lisp/progmodes/cc-mode.el:1490:47: In call to skip-chars-forward: 0-9A-Fa-f in skip set could be [:xdigit:] (pos 0)
  "0-9a-fA-F'"
   ^
lisp/progmodes/cc-mode.el:1492:39: In call to skip-chars-backward: 0-9A-Fa-f in skip set could be [:xdigit:] (pos 0)
  "0-9a-fA-F'"
   ^
lisp/progmodes/cc-mode.el:1533:10: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 33)
  "\\([^'\\]\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\\)'"
   ..........................................^
lisp/progmodes/cc-mode.el:1562:10: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 33)
  "\\([^'\\]\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\\)'"
   ..........................................^
lisp/progmodes/cc-mode.el:1582:8: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 26)
  "\\(\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\\|.\\)?\\('\\([^'\\]\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\\)\\)*'"
   .................................^
lisp/progmodes/cc-mode.el:1582:8: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 84)
  "\\(\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\\|.\\)?\\('\\([^'\\]\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\\)\\)*'"
   .........................................................................................................^
lisp/progmodes/cc-mode.el:1635:17: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 33)
  "\\([^\\']\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\\)'"
   ..........................................^
lisp/progmodes/cperl-mode.el:4423:45: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 3)
  "\\=[0-9a-fA-F][0-9a-fA-F]?\\|\\={[0-9a-fA-F]+}"
   ....^
lisp/progmodes/cperl-mode.el:4423:45: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 14)
  "\\=[0-9a-fA-F][0-9a-fA-F]?\\|\\={[0-9a-fA-F]+}"
   ...............^
lisp/progmodes/cperl-mode.el:4423:45: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 31)
  "\\=[0-9a-fA-F][0-9a-fA-F]?\\|\\={[0-9a-fA-F]+}"
   ..................................^
lisp/progmodes/ebnf-dtd.el:948:19: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 39)
  "^\\(&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[0-9a-fA-F]+\\|[0-9]+\\)\\);\\|[^<&]\\)*$"
   ...........................................^
lisp/progmodes/ebnf-dtd.el:1004:14: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 69)
  "^\\(%[A-Za-z_:][-A-Za-z0-9._:]*;\\|&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[0-9a-fA-F]+\\|[0-9]+\\)\\);\\|[^%&]\\)*$"
   ..........................................................................^
lisp/progmodes/ebnf-ebx.el:661:32: In call to skip-chars-forward: 0-9A-Fa-f in skip set could be [:xdigit:] (pos 0)
  "0-9A-Fa-f"
   ^
lisp/progmodes/hideif.el:542:3: In hif-token-regexp: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 71)
  "\\(?:!=\\|##\\|&&\\|\\.\\.\\.\\|<[<=]\\|==\\|>[=>]\\|||\\|[!#%&(-,/:<-?|~^-]\\)\\|0x[0-9a-fA-F]+\\.?[0-9a-fA-F]*\\|[0-9]+\\.?[0-9]*\\|\\w+"
   .....................................................................................^
lisp/progmodes/hideif.el:542:3: In hif-token-regexp: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 86)
  "\\(?:!=\\|##\\|&&\\|\\.\\.\\.\\|<[<=]\\|==\\|>[=>]\\|||\\|[!#%&(-,/:<-?|~^-]\\)\\|0x[0-9a-fA-F]+\\.?[0-9a-fA-F]*\\|[0-9]+\\.?[0-9]*\\|\\w+"
   .....................................................................................................^
lisp/progmodes/hideif.el:598:38: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 5)
  "0x\\([0-9a-fA-F]+\\.?[0-9a-fA-F]*\\)"
   ......^
lisp/progmodes/hideif.el:598:38: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 20)
  "0x\\([0-9a-fA-F]+\\.?[0-9a-fA-F]*\\)"
   ......................^
lisp/progmodes/vera-mode.el:605:3: In vera-font-lock-keywords: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 16)
  "\\([0-9]*'[bdoh][0-9a-fA-FxXzZ_]+\\)"
   .................^
lisp/progmodes/verilog-mode.el:2760:28: In verilog-delay-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 29)
  "#\\s-*\\(\\([0-9_]+\\('s?[hdxbo][0-9a-fA-F_xz]+\\)?\\)\\|\\(([^()]*)\\)\\|\\(\\sw+\\)\\)"
   .................................^
lisp/progmodes/verilog-mode.el:9180:32: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 25)
  "'[sS]?[hdxboHDXBO]?[ \t]*[0-9a-fA-F_xzXZ?]+"
   ..........................^
lisp/progmodes/verilog-mode.el:9870:21: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 20)
  "^[0-9 \t]+'s?[hdxbo][0-9a-fA-F_xz? \t]*$"
   .....................^
lisp/textmodes/css-mode.el:876:3: In css-escapes-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 16)
  "\\\\\\(?:[^\000-\037\177]\\|[0-9a-fA-F]+[ \n\t\r\f]?\\)"
   .............................^
lisp/textmodes/css-mode.el:877:25: In css-nmchar-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 34)
  "\\(?:[-[:alnum:]]\\|\\\\\\(?:[^\000-\037\177]\\|[0-9a-fA-F]+[ \n\t\r\f]?\\)\\)"
   .................................................^
lisp/textmodes/css-mode.el:878:26: In css-nmstart-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 33)
  "\\(?:[[:alpha:]]\\|\\\\\\(?:[^\000-\037\177]\\|[0-9a-fA-F]+[ \n\t\r\f]?\\)\\)"
   ................................................^
lisp/textmodes/css-mode.el:881:3: In css-ident-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 34)
  "\\(?:[-[:alnum:]]\\|\\\\\\(?:[^\000-\037\177]\\|[0-9a-fA-F]+[ \n\t\r\f]?\\)\\)+"
   .................................................^
lisp/textmodes/css-mode.el:884:23: In css-name-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 34)
  "\\(?:[-[:alnum:]]\\|\\\\\\(?:[^\000-\037\177]\\|[0-9a-fA-F]+[ \n\t\r\f]?\\)\\)+"
   .................................................^
lisp/textmodes/css-mode.el:1077:3: In css--colors-regexp: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 1644)
  "\\_<\\(a\\(?:liceblue\\|ntiquewhite\\|qua\\(?:marine\\)?\\|zure\\)\\|b\\(?:eige\\|isque\\|l\\(?:a\\(?:ck\\|nchedalmond\\)\\|ue\\(?:violet\\)?\\)\\|rown\\|urlywood\\)\\|c\\(?:adetblue\\|h\\(?:\\(?:artreus\\|ocolat\\)e\\)\\|or\\(?:al\\|n\\(?:flowerblue\\|silk\\)\\)\\|\\(?:rimso\\|ya\\)n\\)\\|d\\(?:ark\\(?:blue\\|cyan\\|g\\(?:oldenrod\\|r\\(?:ay\\|e\\(?:en\\|y\\)\\)\\)\\|khaki\\|magenta\\|o\\(?:livegreen\\|r\\(?:ange\\|chid\\)\\)\\|red\\|s\\(?:almon\\|eagreen\\|late\\(?:blue\\|gr\\(?:[ae]y\\)\\)\\)\\|turquoise\\|violet\\)\\|eep\\(?:pink\\|skyblue\\)\\|imgr\\(?:[ae]y\\)\\|odgerblue\\)\\|f\\(?:irebrick\\|loralwhite\\|orestgreen\\|uchsia\\)\\|g\\(?:ainsboro\\|hostwhite\\|old\\(?:enrod\\)?\\|r\\(?:ay\\|e\\(?:en\\(?:yellow\\)?\\|y\\)\\)\\)\\|ho\\(?:neydew\\|tpink\\)\\|i\\(?:ndi\\(?:anred\\|go\\)\\|vory\\)\\|khaki\\|l\\(?:a\\(?:vender\\(?:blush\\)?\\|wngreen\\)\\|emonchiffon\\|i\\(?:ght\\(?:blue\\|c\\(?:oral\\|yan\\)\\|g\\(?:oldenrodyellow\\|r\\(?:ay\\|e\\(?:en\\|y\\)\\)\\)\\|pink\\|s\\(?:almon\\|eagreen\\|kyblue\\|lategr\\(?:[ae]y\\)\\|teelblue\\)\\|yellow\\)\\|me\\(?:green\\)?\\|nen\\)\\)\\|m\\(?:a\\(?:genta\\|roon\\)\\|edium\\(?:aquamarine\\|blue\\|orchid\\|purple\\|s\\(?:eagreen\\|lateblue\\|pringgreen\\)\\|turquoise\\|violetred\\)\\|i\\(?:dnightblue\\|ntcream\\|styrose\\)\\|occasin\\)\\|nav\\(?:ajowhite\\|y\\)\\|o\\(?:l\\(?:dlace\\|ive\\(?:drab\\)?\\)\\|r\\(?:ange\\(?:red\\)?\\|chid\\)\\)\\|p\\(?:a\\(?:le\\(?:g\\(?:oldenrod\\|reen\\)\\|turquoise\\|violetred\\)\\|payawhip\\)\\|e\\(?:achpuff\\|ru\\)\\|ink\\|lum\\|\\(?:owderblu\\|urpl\\)e\\)\\|r\\(?:e\\(?:beccapurple\\|d\\)\\|o\\(?:sybrown\\|yalblue\\)\\)\\|s\\(?:a\\(?:\\(?:ddlebrow\\|lmo\\|ndybrow\\)n\\)\\|ea\\(?:green\\|shell\\)\\|i\\(?:enna\\|lver\\)\\|kyblue\\|late\\(?:blue\\|gr\\(?:[ae]y\\)\\)\\|now\\|pringgreen\\|teelblue\\)\\|t\\(?:an\\|eal\\|histle\\|omato\\|urquoise\\)\\|violet\\|wh\\(?:eat\\|ite\\(?:smoke\\)?\\)\\|yellow\\(?:green\\)?\\)\\_>\\|\\(#[0-9a-fA-F]\\{3,4\\}\\b\\)\\|\\(#\\(?:[0-9a-fA-F][0-9a-fA-F]\\)\\{3,4\\}\\b\\)\\|\\(\\_<rgba?(\\)\\|\\(\\_<hsla?(\\)"
   ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^
lisp/textmodes/css-mode.el:1077:3: In css--colors-regexp: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 1675)
  "\\_<\\(a\\(?:liceblue\\|ntiquewhite\\|qua\\(?:marine\\)?\\|zure\\)\\|b\\(?:eige\\|isque\\|l\\(?:a\\(?:ck\\|nchedalmond\\)\\|ue\\(?:violet\\)?\\)\\|rown\\|urlywood\\)\\|c\\(?:adetblue\\|h\\(?:\\(?:artreus\\|ocolat\\)e\\)\\|or\\(?:al\\|n\\(?:flowerblue\\|silk\\)\\)\\|\\(?:rimso\\|ya\\)n\\)\\|d\\(?:ark\\(?:blue\\|cyan\\|g\\(?:oldenrod\\|r\\(?:ay\\|e\\(?:en\\|y\\)\\)\\)\\|khaki\\|magenta\\|o\\(?:livegreen\\|r\\(?:ange\\|chid\\)\\)\\|red\\|s\\(?:almon\\|eagreen\\|late\\(?:blue\\|gr\\(?:[ae]y\\)\\)\\)\\|turquoise\\|violet\\)\\|eep\\(?:pink\\|skyblue\\)\\|imgr\\(?:[ae]y\\)\\|odgerblue\\)\\|f\\(?:irebrick\\|loralwhite\\|orestgreen\\|uchsia\\)\\|g\\(?:ainsboro\\|hostwhite\\|old\\(?:enrod\\)?\\|r\\(?:ay\\|e\\(?:en\\(?:yellow\\)?\\|y\\)\\)\\)\\|ho\\(?:neydew\\|tpink\\)\\|i\\(?:ndi\\(?:anred\\|go\\)\\|vory\\)\\|khaki\\|l\\(?:a\\(?:vender\\(?:blush\\)?\\|wngreen\\)\\|emonchiffon\\|i\\(?:ght\\(?:blue\\|c\\(?:oral\\|yan\\)\\|g\\(?:oldenrodyellow\\|r\\(?:ay\\|e\\(?:en\\|y\\)\\)\\)\\|pink\\|s\\(?:almon\\|eagreen\\|kyblue\\|lategr\\(?:[ae]y\\)\\|teelblue\\)\\|yellow\\)\\|me\\(?:green\\)?\\|nen\\)\\)\\|m\\(?:a\\(?:genta\\|roon\\)\\|edium\\(?:aquamarine\\|blue\\|orchid\\|purple\\|s\\(?:eagreen\\|lateblue\\|pringgreen\\)\\|turquoise\\|violetred\\)\\|i\\(?:dnightblue\\|ntcream\\|styrose\\)\\|occasin\\)\\|nav\\(?:ajowhite\\|y\\)\\|o\\(?:l\\(?:dlace\\|ive\\(?:drab\\)?\\)\\|r\\(?:ange\\(?:red\\)?\\|chid\\)\\)\\|p\\(?:a\\(?:le\\(?:g\\(?:oldenrod\\|reen\\)\\|turquoise\\|violetred\\)\\|payawhip\\)\\|e\\(?:achpuff\\|ru\\)\\|ink\\|lum\\|\\(?:owderblu\\|urpl\\)e\\)\\|r\\(?:e\\(?:beccapurple\\|d\\)\\|o\\(?:sybrown\\|yalblue\\)\\)\\|s\\(?:a\\(?:\\(?:ddlebrow\\|lmo\\|ndybrow\\)n\\)\\|ea\\(?:green\\|shell\\)\\|i\\(?:enna\\|lver\\)\\|kyblue\\|late\\(?:blue\\|gr\\(?:[ae]y\\)\\)\\|now\\|pringgreen\\|teelblue\\)\\|t\\(?:an\\|eal\\|histle\\|omato\\|urquoise\\)\\|violet\\|wh\\(?:eat\\|ite\\(?:smoke\\)?\\)\\|yellow\\(?:green\\)?\\)\\_>\\|\\(#[0-9a-fA-F]\\{3,4\\}\\b\\)\\|\\(#\\(?:[0-9a-fA-F][0-9a-fA-F]\\)\\{3,4\\}\\b\\)\\|\\(\\_<rgba?(\\)\\|\\(\\_<hsla?(\\)"
   .....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^
lisp/textmodes/css-mode.el:1077:3: In css--colors-regexp: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 1686)
  "\\_<\\(a\\(?:liceblue\\|ntiquewhite\\|qua\\(?:marine\\)?\\|zure\\)\\|b\\(?:eige\\|isque\\|l\\(?:a\\(?:ck\\|nchedalmond\\)\\|ue\\(?:violet\\)?\\)\\|rown\\|urlywood\\)\\|c\\(?:adetblue\\|h\\(?:\\(?:artreus\\|ocolat\\)e\\)\\|or\\(?:al\\|n\\(?:flowerblue\\|silk\\)\\)\\|\\(?:rimso\\|ya\\)n\\)\\|d\\(?:ark\\(?:blue\\|cyan\\|g\\(?:oldenrod\\|r\\(?:ay\\|e\\(?:en\\|y\\)\\)\\)\\|khaki\\|magenta\\|o\\(?:livegreen\\|r\\(?:ange\\|chid\\)\\)\\|red\\|s\\(?:almon\\|eagreen\\|late\\(?:blue\\|gr\\(?:[ae]y\\)\\)\\)\\|turquoise\\|violet\\)\\|eep\\(?:pink\\|skyblue\\)\\|imgr\\(?:[ae]y\\)\\|odgerblue\\)\\|f\\(?:irebrick\\|loralwhite\\|orestgreen\\|uchsia\\)\\|g\\(?:ainsboro\\|hostwhite\\|old\\(?:enrod\\)?\\|r\\(?:ay\\|e\\(?:en\\(?:yellow\\)?\\|y\\)\\)\\)\\|ho\\(?:neydew\\|tpink\\)\\|i\\(?:ndi\\(?:anred\\|go\\)\\|vory\\)\\|khaki\\|l\\(?:a\\(?:vender\\(?:blush\\)?\\|wngreen\\)\\|emonchiffon\\|i\\(?:ght\\(?:blue\\|c\\(?:oral\\|yan\\)\\|g\\(?:oldenrodyellow\\|r\\(?:ay\\|e\\(?:en\\|y\\)\\)\\)\\|pink\\|s\\(?:almon\\|eagreen\\|kyblue\\|lategr\\(?:[ae]y\\)\\|teelblue\\)\\|yellow\\)\\|me\\(?:green\\)?\\|nen\\)\\)\\|m\\(?:a\\(?:genta\\|roon\\)\\|edium\\(?:aquamarine\\|blue\\|orchid\\|purple\\|s\\(?:eagreen\\|lateblue\\|pringgreen\\)\\|turquoise\\|violetred\\)\\|i\\(?:dnightblue\\|ntcream\\|styrose\\)\\|occasin\\)\\|nav\\(?:ajowhite\\|y\\)\\|o\\(?:l\\(?:dlace\\|ive\\(?:drab\\)?\\)\\|r\\(?:ange\\(?:red\\)?\\|chid\\)\\)\\|p\\(?:a\\(?:le\\(?:g\\(?:oldenrod\\|reen\\)\\|turquoise\\|violetred\\)\\|payawhip\\)\\|e\\(?:achpuff\\|ru\\)\\|ink\\|lum\\|\\(?:owderblu\\|urpl\\)e\\)\\|r\\(?:e\\(?:beccapurple\\|d\\)\\|o\\(?:sybrown\\|yalblue\\)\\)\\|s\\(?:a\\(?:\\(?:ddlebrow\\|lmo\\|ndybrow\\)n\\)\\|ea\\(?:green\\|shell\\)\\|i\\(?:enna\\|lver\\)\\|kyblue\\|late\\(?:blue\\|gr\\(?:[ae]y\\)\\)\\|now\\|pringgreen\\|teelblue\\)\\|t\\(?:an\\|eal\\|histle\\|omato\\|urquoise\\)\\|violet\\|wh\\(?:eat\\|ite\\(?:smoke\\)?\\)\\|yellow\\(?:green\\)?\\)\\_>\\|\\(#[0-9a-fA-F]\\{3,4\\}\\b\\)\\|\\(#\\(?:[0-9a-fA-F][0-9a-fA-F]\\)\\{3,4\\}\\b\\)\\|\\(\\_<rgba?(\\)\\|\\(\\_<hsla?(\\)"
   ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^
lisp/textmodes/sgml-mode.el:1296:17: In call to re-search-forward: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 40)
  "\\(&\\(amp\\|quot\\|lt\\|gt\\|#\\([0-9]+\\|[xX][0-9a-fA-F]+\\)\\)\\)\\([][<>&;\n\t \"%!'(),/=?]\\|$\\)"
   ................................................^
lisp/dnd.el:141:4: In call to replace-regexp-in-string: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 2)
  "%[A-Fa-f0-9][A-Fa-f0-9]"
   ..^
lisp/dnd.el:141:4: In call to replace-regexp-in-string: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 13)
  "%[A-Fa-f0-9][A-Fa-f0-9]"
   .............^
lisp/epg.el:952:21: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 37)
  "\\`\\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) \\([0-9A-Fa-f][0-9A-Fa-f]\\) \\([^ ]+\\) \\([0-9]+\\)"
   .............................................^
lisp/epg.el:952:21: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 48)
  "\\`\\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) \\([0-9A-Fa-f][0-9A-Fa-f]\\) \\([^ ]+\\) \\([0-9]+\\)"
   ........................................................^
lisp/epg.el:976:30: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 80)
  "\\`\\([^ ]+\\) [^ ]+ \\([^ ]+\\) \\([^ ]+\\) \\([0-9]+\\) [^ ]+ \\([0-9]+\\) \\([0-9]+\\) \\([0-9A-Fa-f][0-9A-Fa-f]\\) \\(.*\\)"
   ..............................................................................................^
lisp/epg.el:976:30: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 91)
  "\\`\\([^ ]+\\) [^ ]+ \\([^ ]+\\) \\([^ ]+\\) \\([0-9]+\\) [^ ]+ \\([0-9]+\\) \\([0-9]+\\) \\([0-9A-Fa-f][0-9A-Fa-f]\\) \\(.*\\)"
   .........................................................................................................^
lisp/epg.el:1146:21: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 37)
  "\\`\\([DCS]\\) \\([0-9]+\\) \\([0-9]+\\) \\([0-9A-Fa-f][0-9A-Fa-f]\\) \\(.*\\) "
   .............................................^
lisp/epg.el:1146:21: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 48)
  "\\`\\([DCS]\\) \\([0-9]+\\) \\([0-9]+\\) \\([0-9A-Fa-f][0-9A-Fa-f]\\) \\(.*\\) "
   ........................................................^
lisp/epg.el:2024:26: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 13)
  "%\\(\\(%\\)\\|\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\)"
   ..................^
lisp/epg.el:2024:26: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 24)
  "%\\(\\(%\\)\\|\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\)"
   .............................^
lisp/epg.el:2037:36: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 1)
  "[0-9A-Fa-f][0-9A-Fa-f]"
   .^
lisp/epg.el:2037:36: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 12)
  "[0-9A-Fa-f][0-9A-Fa-f]"
   ............^
lisp/epg.el:2046:26: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 24)
  "\\\\\\(\\([,=+<>#;\\\"]\\)\\|\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\)"
   .................................^
lisp/epg.el:2046:26: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 35)
  "\\\\\\(\\([,=+<>#;\\\"]\\)\\|\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\)"
   ............................................^
lisp/epg.el:2084:37: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 4)
  "#\\([0-9A-Fa-f]+\\)"
   .....^
lisp/faces.el:2000:35: In call to string-match-p: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 7)
  "^#\\(?:[a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\)+$"
   ........^
lisp/faces.el:2000:35: In call to string-match-p: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 18)
  "^#\\(?:[a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\)+$"
   ...................^
lisp/faces.el:2000:35: In call to string-match-p: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 29)
  "^#\\(?:[a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\)+$"
   ..............................^
lisp/htmlfontify.el:569:25: In hfy-hex-regex: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 1)
  "[0-9A-Fa-f]"
   .^
lisp/htmlfontify.el:572:3: In hfy-triplet-regex: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 3)
  "\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)"
   ....^
lisp/htmlfontify.el:572:3: In hfy-triplet-regex: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 14)
  "\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)"
   ...............^
lisp/htmlfontify.el:572:3: In hfy-triplet-regex: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 29)
  "\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)"
   ................................^
lisp/htmlfontify.el:572:3: In hfy-triplet-regex: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 40)
  "\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)"
   ...........................................^
lisp/htmlfontify.el:572:3: In hfy-triplet-regex: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 55)
  "\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)"
   ............................................................^
lisp/htmlfontify.el:572:3: In hfy-triplet-regex: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 66)
  "\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\([0-9A-Fa-f][0-9A-Fa-f]\\)"
   .......................................................................^
lisp/version.el:123:31: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 1)
  "[0-9a-fA-F]\\{40\\}"
   .^
lisp/xml.el:198:28: In xml-char-ref-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 19)
  "\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)"
   .....................^
lisp/xml.el:203:37: In xml-entity-or-char-ref-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 15)
  "&\\(?:#\\(x\\)?\\([0-9a-fA-F]+\\)\\|\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\)\\);"
   ...................^
lisp/xml.el:210:28: In xml-reference-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 63)
  "\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)"
   ...................................................................^
lisp/xml.el:214:28: In xml-att-value-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 79)
  "\\(?:\"\\(?:[^&\"]\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^&']\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)"
   ........................................................................................^
lisp/xml.el:214:28: In xml-att-value-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 176)
  "\\(?:\"\\(?:[^&\"]\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^&']\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)"
   ....................................................................................................................................................................................................^
lisp/xml.el:251:31: In xml-default-decl-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 121)
  "\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED\\s-+\\)*\\(?:\"\\(?:[^&\"]\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^&']\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)\\)"
   ........................................................................................................................................^
lisp/xml.el:251:31: In xml-default-decl-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 218)
  "\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED\\s-+\\)*\\(?:\"\\(?:[^&\"]\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^&']\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)\\)"
   ....................................................................................................................................................................................................................................................^
lisp/xml.el:256:26: In xml-att-def-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 452)
  "\\(?:\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\s-*\\(?:CDATA\\|\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)\\|\\(?:\\(?:NOTATION\\s-+(\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\(?:\\s-*|\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\)*\\s-*)\\)\\|\\(?:(\\s-*[[:word:]:_.0-9·̀-ͯ‿⁀-]+\\(?:\\s-*|\\s-*[[:word:]:_.0-9·̀-ͯ‿⁀-]+\\)*\\s-+)\\)\\)\\)\\s-*\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED\\s-+\\)*\\(?:\"\\(?:[^&\"]\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^&']\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)\\)\\)"
   .......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^
lisp/xml.el:256:26: In xml-att-def-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 549)
  "\\(?:\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\s-*\\(?:CDATA\\|\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)\\|\\(?:\\(?:NOTATION\\s-+(\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\(?:\\s-*|\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\)*\\s-*)\\)\\|\\(?:(\\s-*[[:word:]:_.0-9·̀-ͯ‿⁀-]+\\(?:\\s-*|\\s-*[[:word:]:_.0-9·̀-ͯ‿⁀-]+\\)*\\s-+)\\)\\)\\)\\s-*\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED\\s-+\\)*\\(?:\"\\(?:[^&\"]\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^&']\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)\\)\\)"
   ...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^
lisp/xml.el:262:31: In xml-entity-value-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 124)
  "\\(?:\"\\(?:[^%&\"]\\|%\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\);\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^%&']\\|%\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\);\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)"
   ........................................................................................................................................^
lisp/xml.el:262:31: In xml-entity-value-re: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 266)
  "\\(?:\"\\(?:[^%&\"]\\|%\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\);\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^%&']\\|%\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\);\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)"
   ....................................................................................................................................................................................................................................................................................................^
lisp/xml.el:804:28: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 517)
  "<!ATTLIST[ \t\n\r]*\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\)[ \t\n\r]*\\(\\(?:\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\s-*\\(?:CDATA\\|\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)\\|\\(?:\\(?:NOTATION\\s-+(\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\(?:\\s-*|\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\)*\\s-*)\\)\\|\\(?:(\\s-*[[:word:]:_.0-9·̀-ͯ‿⁀-]+\\(?:\\s-*|\\s-*[[:word:]:_.0-9·̀-ͯ‿⁀-]+\\)*\\s-+)\\)\\)\\)\\s-*\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED\\s-+\\)*\\(?:\"\\(?:[^&\"]\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^&']\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)\\)\\)\\)*[ \t\n\r]*>"
   .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^
lisp/xml.el:804:28: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 614)
  "<!ATTLIST[ \t\n\r]*\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\)[ \t\n\r]*\\(\\(?:\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\s-*\\(?:CDATA\\|\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)\\|\\(?:\\(?:NOTATION\\s-+(\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\(?:\\s-*|\\s-*[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\)*\\s-*)\\)\\|\\(?:(\\s-*[[:word:]:_.0-9·̀-ͯ‿⁀-]+\\(?:\\s-*|\\s-*[[:word:]:_.0-9·̀-ͯ‿⁀-]+\\)*\\s-+)\\)\\)\\)\\s-*\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED\\s-+\\)*\\(?:\"\\(?:[^&\"]\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^&']\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)\\)\\)\\)*[ \t\n\r]*>"
   .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^
lisp/xml.el:823:28: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 201)
  "<!ENTITY[ \t\n\r]+\\(%[ \t\n\r]+\\)?\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\)[ \t\n\r]*\\(\\(?:\"\\(?:[^%&\"]\\|%\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\);\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^%&']\\|%\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\);\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)\\)[ \t\n\r]*>"
   ...................................................................................................................................................................................................................................^
lisp/xml.el:823:28: In call to looking-at: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 343)
  "<!ENTITY[ \t\n\r]+\\(%[ \t\n\r]+\\)?\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\)[ \t\n\r]*\\(\\(?:\"\\(?:[^%&\"]\\|%\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\);\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*\"\\|'\\(?:[^%&']\\|%\\([[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*\\);\\|\\(?:&[[:word:]:_][[:word:]:_.0-9·̀-ͯ‿⁀-]*;\\|\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)\\)\\)*'\\)\\)[ \t\n\r]*>"
   ...............................................................................................................................................................................................................................................................................................................................................................................................^
test/src/emacs-module-tests.el:62:18: In call to string-match: 0-9A-Fa-f in char alternative could be [:xdigit:] (pos 31)
  "#<module function \\(at \\(0x\\)?[0-9a-fA-F]+\\( from .*\\)?\\|Fmod_test_sum from .*\\)>"
   ..................................^

^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 16:31       ` Mattias Engdegård
@ 2019-06-11 16:50         ` Drew Adams
  2019-06-11 17:04           ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Drew Adams @ 2019-06-11 16:50 UTC (permalink / raw)
  To: Mattias Engdegård, Paul Eggert; +Cc: 36167, Konstantin Kharlamov

> [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)

+1.  At least the doc for [:digit:] should say exactly
what it matches.  Then it'll be clear for readers and
writers.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 16:50         ` Drew Adams
@ 2019-06-11 17:04           ` Eli Zaretskii
  2019-06-11 17:18             ` Paul Eggert
                               ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Eli Zaretskii @ 2019-06-11 17:04 UTC (permalink / raw)
  To: Drew Adams; +Cc: mattiase, eggert, 36167, hi-angel

> Date: Tue, 11 Jun 2019 09:50:24 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 36167@debbugs.gnu.org, Konstantin Kharlamov <hi-angel@yandex.ru>
> 
> > [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)
> 
> +1.  At least the doc for [:digit:] should say exactly
> what it matches.  Then it'll be clear for readers and
> writers.

Isn't it clear already?  Here's what the documentation says now:

  ‘[:digit:]’
       This matches ‘0’ through ‘9’.  Thus, ‘[-+[:digit:]]’ matches any
       digit, as well as ‘+’ and ‘-’.

Is anything missing here?  Where did the question about non-ASCII
digits come from, given this text?





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 17:04           ` Eli Zaretskii
@ 2019-06-11 17:18             ` Paul Eggert
  2019-06-11 17:32               ` Eli Zaretskii
  2019-06-11 17:19             ` Drew Adams
  2019-06-11 17:50             ` npostavs
  2 siblings, 1 reply; 19+ messages in thread
From: Paul Eggert @ 2019-06-11 17:18 UTC (permalink / raw)
  To: Eli Zaretskii, Drew Adams; +Cc: mattiase, 36167, hi-angel

On 6/11/19 10:04 AM, Eli Zaretskii wrote:
> Where did the question about non-ASCII
> digits come from, given this text?

It came from POSIX, where [:xdigit:] and [:digit:] might match other 
characters. Similarly, in POSIX [a-f] might match characters other than 
'a', 'b', 'c', 'd', 'e', 'f'. We don't need to worry about this in 
Emacs, since Emacs regexps don't have that particular misfeature of POSIX.

I'm on the fence about replacing 0-9A-Fa-f with [:xdigit:], as I can see 
both sides of the argument. If Mattias is dubious, then perhaps we 
should leave the regexps alone - he's had more experience than the rest 
of us when it comes to scanning for dubious regexp constructions.






^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 17:04           ` Eli Zaretskii
  2019-06-11 17:18             ` Paul Eggert
@ 2019-06-11 17:19             ` Drew Adams
  2019-06-11 17:34               ` Eli Zaretskii
  2019-06-11 17:50             ` npostavs
  2 siblings, 1 reply; 19+ messages in thread
From: Drew Adams @ 2019-06-11 17:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mattiase, eggert, 36167, hi-angel

> > > [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)
> >
> > +1.  At least the doc for [:digit:] should say exactly
> > what it matches.  Then it'll be clear for readers and
> > writers.
> 
> Isn't it clear already?

I meant [:xdigit:], not [:digit:], in my reply.  Sorry for
the typo.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 17:18             ` Paul Eggert
@ 2019-06-11 17:32               ` Eli Zaretskii
  0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2019-06-11 17:32 UTC (permalink / raw)
  To: Paul Eggert; +Cc: mattiase, 36167, hi-angel

> Cc: mattiase@acm.org, 36167@debbugs.gnu.org, hi-angel@yandex.ru
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Tue, 11 Jun 2019 10:18:44 -0700
> 
> On 6/11/19 10:04 AM, Eli Zaretskii wrote:
> > Where did the question about non-ASCII
> > digits come from, given this text?
> 
> It came from POSIX, where [:xdigit:] and [:digit:] might match other 
> characters.

Yes, but when using Emacs and coding for Emacs, one must read the
Emacs documentation, which clearly says what these do in Emacs.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 17:19             ` Drew Adams
@ 2019-06-11 17:34               ` Eli Zaretskii
  0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2019-06-11 17:34 UTC (permalink / raw)
  To: Drew Adams; +Cc: mattiase, eggert, 36167, hi-angel

> Date: Tue, 11 Jun 2019 10:19:17 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: mattiase@acm.org, eggert@cs.ucla.edu, 36167@debbugs.gnu.org,
>         hi-angel@yandex.ru
> 
> > Isn't it clear already?
> 
> I meant [:xdigit:], not [:digit:], in my reply.  Sorry for
> the typo.

:xdigit: is also clearly documented:

  ‘[:xdigit:]’
       This matches the hexadecimal digits: ‘0’ through ‘9’, ‘a’ through
       ‘f’ and ‘A’ through ‘F’.






^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 17:04           ` Eli Zaretskii
  2019-06-11 17:18             ` Paul Eggert
  2019-06-11 17:19             ` Drew Adams
@ 2019-06-11 17:50             ` npostavs
  2019-06-11 17:53               ` Eli Zaretskii
  2 siblings, 1 reply; 19+ messages in thread
From: npostavs @ 2019-06-11 17:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mattiase, eggert, 36167, hi-angel

Eli Zaretskii <eliz@gnu.org> writes:

>> > [0-9A-Fa-f] still has one advantage: the reader, and the
>> > writer, know exactly which characters are included without looking it up.
                                                        ^^^^^^^^^^^^^^^^^^^^^
>> > - whether non-ascii digits are accepted

>  ‘[:digit:]’
>       This matches ‘0’ through ‘9’.  Thus, ‘[-+[:digit:]]’ matches any
>       digit, as well as ‘+’ and ‘-’.

> Is anything missing here?  Where did the question about non-ASCII
> digits come from, given this text?

It came from (a hypothetical) user who doesn't remember (or hasn't read)
the documentation.  The advantage of [0-9A-Fa-f] vs [[:xdigit:]] here is
similar to explicit comparison against (point-min) vs (bobp) that you
pointed out in #35967.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 17:50             ` npostavs
@ 2019-06-11 17:53               ` Eli Zaretskii
  2019-06-11 18:14                 ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2019-06-11 17:53 UTC (permalink / raw)
  To: npostavs; +Cc: mattiase, eggert, 36167, hi-angel

> From: npostavs@gmail.com
> Cc: Drew Adams <drew.adams@oracle.com>,  mattiase@acm.org,  eggert@cs.ucla.edu,  36167@debbugs.gnu.org,  hi-angel@yandex.ru
> Date: Tue, 11 Jun 2019 13:50:49 -0400
> 
> The advantage of [0-9A-Fa-f] vs [[:xdigit:]] here is similar to
> explicit comparison against (point-min) vs (bobp) that you pointed
> out in #35967.

I'm not against the replacement, I responded to the request to have a
clear documentation of these character classes.  Which we do have, so
I was puzzled why people pretend we don't.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 17:53               ` Eli Zaretskii
@ 2019-06-11 18:14                 ` Eli Zaretskii
  0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2019-06-11 18:14 UTC (permalink / raw)
  To: npostavs, mattiase, eggert; +Cc: 36167, hi-angel

> From: Eli Zaretskii <eliz@gnu.org>
> Cc: mattiase@acm.org, eggert@cs.ucla.edu, 36167@debbugs.gnu.org,
>  hi-angel@yandex.ru
> 
> I'm not against the replacement, I responded to the request to have a
> clear documentation of these character classes.

Specifically, this:

> > [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)
> 
> +1.  At least the doc for [:digit:] should say exactly
> what it matches.  Then it'll be clear for readers and
> writers.

The last part says "the doc should say" as if the doc doesn't already
say.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
       [not found]               ` <<83tvcw7zvq.fsf@gnu.org>
@ 2019-06-11 19:01                 ` Drew Adams
  0 siblings, 0 replies; 19+ messages in thread
From: Drew Adams @ 2019-06-11 19:01 UTC (permalink / raw)
  To: Eli Zaretskii, npostavs, mattiase, eggert; +Cc: 36167, hi-angel

> > +1.  At least the doc for [:digit:] should say exactly
> > what it matches.  Then it'll be clear for readers and
> > writers.
> 
> The last part says "the doc should say" as if the doc doesn't already
> say.

Yes, my bad. Forgot that it exists, and misread the
proposal as including its creation.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 11:59 Konstantin Kharlamov
  2019-06-11 14:26 ` Paul Eggert
@ 2019-06-11 19:56 ` Andy Moreton
  2019-06-12  2:30   ` Eli Zaretskii
  2019-06-12 11:44 ` Andy Moreton
  2 siblings, 1 reply; 19+ messages in thread
From: Andy Moreton @ 2019-06-11 19:56 UTC (permalink / raw)
  To: 36167

On Tue 11 Jun 2019, Eli Zaretskii wrote:

>> Date: Tue, 11 Jun 2019 10:19:17 -0700 (PDT)
>> From: Drew Adams <drew.adams@oracle.com>
>> Cc: mattiase@acm.org, eggert@cs.ucla.edu, 36167@debbugs.gnu.org,
>>         hi-angel@yandex.ru
>> 
>> > Isn't it clear already?
>> 
>> I meant [:xdigit:], not [:digit:], in my reply.  Sorry for
>> the typo.
>
> :xdigit: is also clearly documented:
>
>   ‘[:xdigit:]’
>        This matches the hexadecimal digits: ‘0’ through ‘9’, ‘a’ through
>        ‘f’ and ‘A’ through ‘F’.

The docs for [:digit:] and [:xdigit:] seem clear enough, but there is
one other minor point that could be clarified.

The [:alnum:] and [:alpha:] are based on (unspecified values of) the Unicode
general-category property, but [:digit:] is not. Thus [:alnum:] includes
other numeric characters that are not matched by [:digit:].

    AndyM






^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 19:56 ` Andy Moreton
@ 2019-06-12  2:30   ` Eli Zaretskii
  0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2019-06-12  2:30 UTC (permalink / raw)
  To: Andy Moreton; +Cc: 36167

> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Tue, 11 Jun 2019 20:56:09 +0100
> 
> The docs for [:digit:] and [:xdigit:] seem clear enough, but there is
> one other minor point that could be clarified.
> 
> The [:alnum:] and [:alpha:] are based on (unspecified values of) the Unicode
> general-category property, but [:digit:] is not. Thus [:alnum:] includes
> other numeric characters that are not matched by [:digit:].

It's true that [:alnum:] includes more numerical characters that
[:digit:], but what exactly needs to be clarified here?  Assuming you
mean clarified in the manual, that is.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-11 11:59 Konstantin Kharlamov
  2019-06-11 14:26 ` Paul Eggert
  2019-06-11 19:56 ` Andy Moreton
@ 2019-06-12 11:44 ` Andy Moreton
  2019-06-12 16:07   ` Eli Zaretskii
  2 siblings, 1 reply; 19+ messages in thread
From: Andy Moreton @ 2019-06-12 11:44 UTC (permalink / raw)
  To: 36167

On Wed 12 Jun 2019, Eli Zaretskii wrote:

>> From: Andy Moreton <andrewjmoreton@gmail.com>
>> Date: Tue, 11 Jun 2019 20:56:09 +0100
>> 
>> The docs for [:digit:] and [:xdigit:] seem clear enough, but there is
>> one other minor point that could be clarified.
>> 
>> The [:alnum:] and [:alpha:] are based on (unspecified values of) the Unicode
>> general-category property, but [:digit:] is not. Thus [:alnum:] includes
>> other numeric characters that are not matched by [:digit:].
>
> It's true that [:alnum:] includes more numerical characters that
> [:digit:], but what exactly needs to be clarified here?  Assuming you
> mean clarified in the manual, that is.

As noted by Paul Eggert, the POSIX behaviour is different. It may be
worth a note in the manual to draw attention to this difference.

    AndyM






^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
  2019-06-12 11:44 ` Andy Moreton
@ 2019-06-12 16:07   ` Eli Zaretskii
  0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2019-06-12 16:07 UTC (permalink / raw)
  To: Andy Moreton; +Cc: 36167

> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Wed, 12 Jun 2019 12:44:12 +0100
> 
> >> The [:alnum:] and [:alpha:] are based on (unspecified values of) the Unicode
> >> general-category property, but [:digit:] is not. Thus [:alnum:] includes
> >> other numeric characters that are not matched by [:digit:].
> >
> > It's true that [:alnum:] includes more numerical characters that
> > [:digit:], but what exactly needs to be clarified here?  Assuming you
> > mean clarified in the manual, that is.
> 
> As noted by Paul Eggert, the POSIX behaviour is different. It may be
> worth a note in the manual to draw attention to this difference.

It's strange to say in the manual what we do NOT do.  The current text
says:

  ‘[:digit:]’
       This matches ‘0’ through ‘9’.  Thus, ‘[-+[:digit:]]’ matches any
       digit, as well as ‘+’ and ‘-’.

I believe you suggest to add to this something like "Note that Posix
interpretation of '[:digit:]' is different"?  Given the crystal
clarity of the current text, wouldn't such addition confuse the
reader?

Btw, where's the reference for a different interpretation by Posix?  I
cannot find anything to that effect; even the Unicode UTS18
(http://www.unicode.org/reports/tr18/) says, while describing the
Posix equivalent of the Unicode regexp notations: "Non-decimal numbers
(like Roman numerals) are normally excluded".  What am I missing?





^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-06-12 16:07 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <<ac570eed-c6f4-0d6d-fc1c-2f116d597bd7@cs.ucla.edu>
     [not found] ` <<1560263874.21373.1@yandex.ru>
     [not found]   ` <<5f7ea771-2a22-ba10-b3ce-6adb5e85dc9d@cs.ucla.edu>
     [not found]     ` <<85476B58-4CBD-45C9-903C-5E49D8E5D019@acm.org>
     [not found]       ` <<be6e97d4-5040-47b5-b27b-6a52d2f46072@default>
     [not found]         ` <<83zhmo834p.fsf@gnu.org>
     [not found]           ` <<85zhmo9fk6.fsf@gmail.com>
     [not found]             ` <<83v9xc80uv.fsf@gnu.org>
     [not found]               ` <<83tvcw7zvq.fsf@gnu.org>
2019-06-11 19:01                 ` bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]] Drew Adams
2019-06-11 11:59 Konstantin Kharlamov
2019-06-11 14:26 ` Paul Eggert
2019-06-11 14:37   ` Konstantin Kharlamov
2019-06-11 15:37     ` Paul Eggert
2019-06-11 16:31       ` Mattias Engdegård
2019-06-11 16:50         ` Drew Adams
2019-06-11 17:04           ` Eli Zaretskii
2019-06-11 17:18             ` Paul Eggert
2019-06-11 17:32               ` Eli Zaretskii
2019-06-11 17:19             ` Drew Adams
2019-06-11 17:34               ` Eli Zaretskii
2019-06-11 17:50             ` npostavs
2019-06-11 17:53               ` Eli Zaretskii
2019-06-11 18:14                 ` Eli Zaretskii
2019-06-11 19:56 ` Andy Moreton
2019-06-12  2:30   ` Eli Zaretskii
2019-06-12 11:44 ` Andy Moreton
2019-06-12 16:07   ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.