aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Kharlamov2019-06-13 03:18:43 +0300
committerEli Zaretskii2019-07-06 10:54:25 +0300
commitdfc322d77fd1ce3aa4d852e0ff07bb36944f6432 (patch)
tree8c17686c0e2ae4beaab2f4568cd3654f0fb756cc
parent814b509b1ddf7863d18f7f443e8d733173904e81 (diff)
downloademacs-dfc322d77fd1ce3aa4d852e0ff07bb36944f6432.tar.gz
emacs-dfc322d77fd1ce3aa4d852e0ff07bb36944f6432.zip
Replace manually crafted hex regexes with [:xdigit:]
* admin/charsets/mapconv: * build-aux/gitlog-to-changelog (parse_amend_file, git_dir_option): * lisp/progmodes/verilog-mode.el (verilog-delay-re): (verilog-type-font-keywords, verilog-read-always-signals-recurse): (verilog-is-number): * lisp/progmodes/vera-mode.el (vera-font-lock-keywords): * test/src/emacs-module-tests.el (mod-test-sum-test): * lisp/xml.el: (xml--entity-replacement-text): * lisp/version.el (emacs-repository-version-git): * lisp/textmodes/sgml-mode.el (sgml-quote): * lisp/textmodes/css-mode.el (css-escapes-re) (css--colors-regexp): * lisp/progmodes/prolog.el (prolog-syntax-propertize-function): * lisp/progmodes/hideif.el (hif-token-regexp, hif-tokenize): * lisp/progmodes/ebnf-dtd.el: (ebnf-dtd-attlistdecl) (ebnf-dtd-entitydecl, ebnf-dtd-lex): * lisp/progmodes/ebnf-ebx.el (ebnf-ebx-hex-character): * lisp/progmodes/ebnf-abn.el (ebnf-abn-character): * lisp/progmodes/cperl-mode.el (cperl-highlight-charclass) (cperl-find-pods-heres): * lisp/progmodes/cc-mode.el (c-maybe-quoted-number-head) (c-maybe-quoted-number, c-parse-quotes-before-change) (c-parse-quotes-after-change, c-quoted-number-head-before-point) (c-quoted-number-straddling-point): * lisp/progmodes/ada-mode.el (featurep, ada-in-numeric-literal-p) (ada-font-lock-keywords): * lisp/org/org-mobile.el (org-mobile-copy-agenda-files) * lisp/org/org-table.el (org-table-number-regexp): (org-mobile-update-checksum-for-capture-file): * lisp/nxml/xsd-regexp.el (xsdre-gen-categories): * lisp/nxml/xmltok.el (let*): * lisp/nxml/rng-xsd.el (rng-xsd-convert-hex-binary) (rng-xsd-convert-any-uri): * lisp/nxml/rng-uri.el (rng-uri-file-name-1) (rng-uri-unescape-multibyte, rng-uri-unescape-unibyte) (rng-uri-unescape-unibyte-match) (rng-uri-unescape-unibyte-replace): * lisp/nxml/rng-cmpct.el (rng-c-process-escapes): * lisp/nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set): * lisp/net/shr-color.el (shr-color->hexadecimal): * lisp/mail/rfc2231.el (rfc2231-decode-encoded-string): * lisp/international/mule-cmds.el (read-char-by-name): * lisp/htmlfontify.el (hfy-hex-regex): * lisp/gnus/nneething.el (nneething-decode-file-name): * lisp/gnus/mml-sec.el (mml-secure-find-usable-keys): * lisp/gnus/gnus-art.el (gnus-button-mid-or-mail-heuristic-alist): * lisp/faces.el (read-color): * lisp/epg.el (epg--status-ERRSIG, epg--status-VALIDSIG) (epg--status-SIG_CREATED, epg--decode-percent-escape) (epg--decode-hexstring, epg--decode-quotedstring) (epg-dn-from-string): * lisp/emulation/cua-rect.el (cua-incr-rectangle): * lisp/dnd.el (dnd-unescape-uri): * lisp/cedet/semantic/lex.el (semantic-lex-number-expression): * lisp/cedet/semantic/java.el (semantic-java-number-regexp): * lisp/calc/calc-lang.el (pascal): * lisp/calc/calc-ext.el (math-read-number-fancy): * lisp/calc/calc-aent.el (math-read-token): Replace various combinations of [0-9a-fA-F] with [[:xdigit:]]. (Bug#36167)
-rwxr-xr-xadmin/charsets/mapconv2
-rwxr-xr-xbuild-aux/gitlog-to-changelog6
-rw-r--r--lisp/calc/calc-aent.el2
-rw-r--r--lisp/calc/calc-ext.el4
-rw-r--r--lisp/calc/calc-lang.el2
-rw-r--r--lisp/cedet/semantic/java.el4
-rw-r--r--lisp/cedet/semantic/lex.el4
-rw-r--r--lisp/dnd.el2
-rw-r--r--lisp/emulation/cua-rect.el2
-rw-r--r--lisp/epg.el14
-rw-r--r--lisp/faces.el2
-rw-r--r--lisp/gnus/gnus-art.el8
-rw-r--r--lisp/gnus/mml-sec.el2
-rw-r--r--lisp/gnus/nneething.el2
-rw-r--r--lisp/htmlfontify.el2
-rw-r--r--lisp/international/mule-cmds.el2
-rw-r--r--lisp/mail/rfc2231.el2
-rw-r--r--lisp/net/shr-color.el2
-rw-r--r--lisp/nxml/nxml-maint.el4
-rw-r--r--lisp/nxml/rng-cmpct.el2
-rw-r--r--lisp/nxml/rng-uri.el10
-rw-r--r--lisp/nxml/rng-xsd.el4
-rw-r--r--lisp/nxml/xmltok.el2
-rw-r--r--lisp/nxml/xsd-regexp.el2
-rw-r--r--lisp/org/org-mobile.el4
-rw-r--r--lisp/org/org-table.el6
-rw-r--r--lisp/progmodes/ada-mode.el6
-rw-r--r--lisp/progmodes/cc-mode.el22
-rw-r--r--lisp/progmodes/cperl-mode.el8
-rw-r--r--lisp/progmodes/ebnf-abn.el2
-rw-r--r--lisp/progmodes/ebnf-dtd.el16
-rw-r--r--lisp/progmodes/ebnf-ebx.el2
-rw-r--r--lisp/progmodes/hideif.el4
-rw-r--r--lisp/progmodes/prolog.el2
-rw-r--r--lisp/progmodes/vera-mode.el2
-rw-r--r--lisp/progmodes/verilog-mode.el8
-rw-r--r--lisp/textmodes/css-mode.el6
-rw-r--r--lisp/textmodes/sgml-mode.el2
-rw-r--r--lisp/version.el2
-rw-r--r--lisp/xml.el8
-rw-r--r--test/src/emacs-module-tests.el2
41 files changed, 95 insertions, 95 deletions
diff --git a/admin/charsets/mapconv b/admin/charsets/mapconv
index 8e19972f3df..2696b13a52e 100755
--- a/admin/charsets/mapconv
+++ b/admin/charsets/mapconv
@@ -118,7 +118,7 @@ elif [ "$3" = "IANA" ] ; then
118 # Source format is: 118 # Source format is:
119 # 0xXX 0xYYYY 119 # 0xXX 0xYYYY
120 sed -n -e "${2}p" < $1 \ 120 sed -n -e "${2}p" < $1 \
121 | sed -e 's/\(0x[0-9A-Fa-f]*\)[^0]*\(0x[0-9A-Fa-f]*\).*/\1 \2/' \ 121 | sed -e 's/\(0x[[:xdigit:]]*\)[^0]*\(0x[[:xdigit:]]*\).*/\1 \2/' \
122 | sort | ${AWKPROG} 122 | sort | ${AWKPROG}
123elif [ "$3" = "UNICODE" ] ; then 123elif [ "$3" = "UNICODE" ] ; then
124 # Source format is: 124 # Source format is:
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 3acfa8b4c5b..163c48c8e21 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -189,7 +189,7 @@ sub parse_amend_file($)
189 189
190 if (!$in_code) 190 if (!$in_code)
191 { 191 {
192 $line =~ /^([0-9a-fA-F]{40})$/ 192 $line =~ /^([[:xdigit:]]{40})$/
193 or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), 193 or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"),
194 $fail = 1, next; 194 $fail = 1, next;
195 $sha = lc $1; 195 $sha = lc $1;
@@ -303,7 +303,7 @@ sub git_dir_option($)
303 my ($sha, $rest) = split ':', $log, 2; 303 my ($sha, $rest) = split ':', $log, 2;
304 defined $sha 304 defined $sha
305 or die "$ME:$.: malformed log entry\n"; 305 or die "$ME:$.: malformed log entry\n";
306 $sha =~ /^[0-9a-fA-F]{40}$/ 306 $sha =~ /^[[:xdigit:]]{40}$/
307 or die "$ME:$.: invalid SHA1: $sha\n"; 307 or die "$ME:$.: invalid SHA1: $sha\n";
308 308
309 my $skipflag = 0; 309 my $skipflag = 0;
@@ -391,7 +391,7 @@ sub git_dir_option($)
391 @skipshas = (); 391 @skipshas = ();
392 next; 392 next;
393 } 393 }
394 if ($found && $_ =~ /^([0-9a-fA-F]{7,}) [^ ]/) 394 if ($found && $_ =~ /^([[:xdigit:]]{7,}) [^ ]/)
395 { 395 {
396 push ( @skipshas, $1 ); 396 push ( @skipshas, $1 );
397 } 397 }
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el
index a03bd6039cc..f7731c95fc0 100644
--- a/lisp/calc/calc-aent.el
+++ b/lisp/calc/calc-aent.el
@@ -728,7 +728,7 @@ in Calc algebraic input.")
728 math-exp-str (1- math-exp-pos)) 728 math-exp-str (1- math-exp-pos))
729 (1- math-exp-pos)))))) 729 (1- math-exp-pos))))))
730 (or (and (memq calc-language calc-lang-c-type-hex) 730 (or (and (memq calc-language calc-lang-c-type-hex)
731 (eq (string-match "0[xX][0-9a-fA-F]+" math-exp-str 731 (eq (string-match "0[xX][[:xdigit:]]+" math-exp-str
732 math-exp-pos) 732 math-exp-pos)
733 math-exp-pos)) 733 math-exp-pos))
734 (string-match "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\(0*\\([2-9]\\|1[0-4]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-dA-D.]+[eE][-+_]?[0-9]+\\|0*\\([2-9]\\|[0-2][0-9]\\|3[0-6]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-zA-Zα-ωΑ-Ω:.]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?" 734 (string-match "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\(0*\\([2-9]\\|1[0-4]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-dA-D.]+[eE][-+_]?[0-9]+\\|0*\\([2-9]\\|[0-2][0-9]\\|3[0-6]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-zA-Zα-ωΑ-Ω:.]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?"
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 43360fc976f..203625873a5 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -2967,13 +2967,13 @@ If X is not an error form, return 1."
2967 2967
2968 ;; C language hexadecimal notation 2968 ;; C language hexadecimal notation
2969 ((and (eq calc-language 'c) 2969 ((and (eq calc-language 'c)
2970 (string-match "^0[xX]\\([0-9a-fA-F]+\\)$" s)) 2970 (string-match "^0[xX]\\([[:xdigit:]]+\\)$" s))
2971 (let ((digs (math-match-substring s 1))) 2971 (let ((digs (math-match-substring s 1)))
2972 (math-read-radix digs 16))) 2972 (math-read-radix digs 16)))
2973 2973
2974 ;; Pascal language hexadecimal notation 2974 ;; Pascal language hexadecimal notation
2975 ((and (eq calc-language 'pascal) 2975 ((and (eq calc-language 'pascal)
2976 (string-match "^\\$\\([0-9a-fA-F]+\\)$" s)) 2976 (string-match "^\\$\\([[:xdigit:]]+\\)$" s))
2977 (let ((digs (math-match-substring s 1))) 2977 (let ((digs (math-match-substring s 1)))
2978 (math-read-radix digs 16))) 2978 (math-read-radix digs 16)))
2979 2979
diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el
index ee107df39c1..4a9771d7438 100644
--- a/lisp/calc/calc-lang.el
+++ b/lisp/calc/calc-lang.el
@@ -243,7 +243,7 @@
243(put 'pascal 'math-lang-read-symbol 243(put 'pascal 'math-lang-read-symbol
244 '((?\$ 244 '((?\$
245 (eq (string-match 245 (eq (string-match
246 "\\(\\$[0-9a-fA-F]+\\)\\($\\|[^0-9a-zA-Zα-ωΑ-Ω]\\)" 246 "\\(\\$[[:xdigit:]]+\\)\\($\\|[^0-9a-zA-Zα-ωΑ-Ω]\\)"
247 math-exp-str math-exp-pos) 247 math-exp-str math-exp-pos)
248 math-exp-pos) 248 math-exp-pos)
249 (setq math-exp-token 'number 249 (setq math-exp-token 'number
diff --git a/lisp/cedet/semantic/java.el b/lisp/cedet/semantic/java.el
index 54cce965459..7f9c93b906f 100644
--- a/lisp/cedet/semantic/java.el
+++ b/lisp/cedet/semantic/java.el
@@ -51,7 +51,7 @@
51 "\\|" 51 "\\|"
52 "\\<[0-9]+[eE][-+]?[0-9]+[fFdD]?\\>" 52 "\\<[0-9]+[eE][-+]?[0-9]+[fFdD]?\\>"
53 "\\|" 53 "\\|"
54 "\\<0[xX][0-9a-fA-F]+[lL]?\\>" 54 "\\<0[xX][[:xdigit:]]+[lL]?\\>"
55 "\\|" 55 "\\|"
56 "\\<[0-9]+[lLfFdD]?\\>" 56 "\\<[0-9]+[lLfFdD]?\\>"
57 "\\)" 57 "\\)"
@@ -63,7 +63,7 @@ DECIMAL_LITERAL:
63 [1-9][0-9]* 63 [1-9][0-9]*
64 ; 64 ;
65HEX_LITERAL: 65HEX_LITERAL:
66 0[xX][0-9a-fA-F]+ 66 0[xX][[:xdigit:]]+
67 ; 67 ;
68OCTAL_LITERAL: 68OCTAL_LITERAL:
69 0[0-7]* 69 0[0-7]*
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index 8dbc9e7ae83..a6ee869c037 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -596,7 +596,7 @@ may need to be overridden for some special languages.")
596 "\\|" 596 "\\|"
597 "\\<[0-9]+[eE][-+]?[0-9]+[fFdD]?\\>" 597 "\\<[0-9]+[eE][-+]?[0-9]+[fFdD]?\\>"
598 "\\|" 598 "\\|"
599 "\\<0[xX][0-9a-fA-F]+[lL]?\\>" 599 "\\<0[xX][[:xdigit:]]+[lL]?\\>"
600 "\\|" 600 "\\|"
601 "\\<[0-9]+[lLfFdD]?\\>" 601 "\\<[0-9]+[lLfFdD]?\\>"
602 "\\)" 602 "\\)"
@@ -609,7 +609,7 @@ DECIMAL_LITERAL:
609 [1-9][0-9]* 609 [1-9][0-9]*
610 ; 610 ;
611HEX_LITERAL: 611HEX_LITERAL:
612 0[xX][0-9a-fA-F]+ 612 0[xX][[:xdigit:]]+
613 ; 613 ;
614OCTAL_LITERAL: 614OCTAL_LITERAL:
615 0[0-7]* 615 0[0-7]*
diff --git a/lisp/dnd.el b/lisp/dnd.el
index 459a7238dcd..973af7e518b 100644
--- a/lisp/dnd.el
+++ b/lisp/dnd.el
@@ -138,7 +138,7 @@ Return nil if URI is not a local file."
138 138
139(defsubst dnd-unescape-uri (uri) 139(defsubst dnd-unescape-uri (uri)
140 (replace-regexp-in-string 140 (replace-regexp-in-string
141 "%[A-Fa-f0-9][A-Fa-f0-9]" 141 "%[[:xdigit:]][[:xdigit:]]"
142 (lambda (arg) 142 (lambda (arg)
143 (let ((str (make-string 1 0))) 143 (let ((str (make-string 1 0)))
144 (aset str 0 (string-to-number (substring arg 1) 16)) 144 (aset str 0 (string-to-number (substring arg 1) 16))
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index 706634a5017..1a19cc2910e 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -1127,7 +1127,7 @@ The length of STRING need not be the same as the rectangle width."
1127 (cua--rectangle-operation 'keep nil t 1 nil 1127 (cua--rectangle-operation 'keep nil t 1 nil
1128 (lambda (_s e _l _r) 1128 (lambda (_s e _l _r)
1129 (cond 1129 (cond
1130 ((re-search-forward "0x\\([0-9a-fA-F]+\\)" e t) 1130 ((re-search-forward "0x\\([[:xdigit:]]+\\)" e t)
1131 (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1))) 1131 (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1)))
1132 (n (string-to-number txt 16)) 1132 (n (string-to-number txt 16))
1133 (fmt (format "0x%%0%dx" (length txt)))) 1133 (fmt (format "0x%%0%dx" (length txt))))
diff --git a/lisp/epg.el b/lisp/epg.el
index a8b5a408a89..8029bf5a931 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -952,7 +952,7 @@ callback data (if any)."
952 952
953(defun epg--status-ERRSIG (context string) 953(defun epg--status-ERRSIG (context string)
954 (if (string-match "\\`\\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) \ 954 (if (string-match "\\`\\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) \
955\\([0-9A-Fa-f][0-9A-Fa-f]\\) \\([^ ]+\\) \\([0-9]+\\)" 955\\([[:xdigit:]][[:xdigit:]]\\) \\([^ ]+\\) \\([0-9]+\\)"
956 string) 956 string)
957 (let ((signature (epg-make-signature 'error))) 957 (let ((signature (epg-make-signature 'error)))
958 (epg-context-set-result-for 958 (epg-context-set-result-for
@@ -976,7 +976,7 @@ callback data (if any)."
976 (when (and signature 976 (when (and signature
977 (eq (epg-signature-status signature) 'good) 977 (eq (epg-signature-status signature) 'good)
978 (string-match "\\`\\([^ ]+\\) [^ ]+ \\([^ ]+\\) \\([^ ]+\\) \ 978 (string-match "\\`\\([^ ]+\\) [^ ]+ \\([^ ]+\\) \\([^ ]+\\) \
979\\([0-9]+\\) [^ ]+ \\([0-9]+\\) \\([0-9]+\\) \\([0-9A-Fa-f][0-9A-Fa-f]\\) \ 979\\([0-9]+\\) [^ ]+ \\([0-9]+\\) \\([0-9]+\\) \\([[:xdigit:]][[:xdigit:]]\\) \
980\\(.*\\)" 980\\(.*\\)"
981 string)) 981 string))
982 (setf (epg-signature-fingerprint signature) 982 (setf (epg-signature-fingerprint signature)
@@ -1146,7 +1146,7 @@ callback data (if any)."
1146 1146
1147(defun epg--status-SIG_CREATED (context string) 1147(defun epg--status-SIG_CREATED (context string)
1148 (if (string-match "\\`\\([DCS]\\) \\([0-9]+\\) \\([0-9]+\\) \ 1148 (if (string-match "\\`\\([DCS]\\) \\([0-9]+\\) \\([0-9]+\\) \
1149\\([0-9A-Fa-f][0-9A-Fa-f]\\) \\(.*\\) " string) 1149\\([[:xdigit:]][[:xdigit:]]\\) \\(.*\\) " string)
1150 (epg-context-set-result-for 1150 (epg-context-set-result-for
1151 context 'sign 1151 context 'sign
1152 (cons (epg-make-new-signature 1152 (cons (epg-make-new-signature
@@ -2022,7 +2022,7 @@ If you are unsure, use synchronous version of this function
2022(defun epg--decode-percent-escape (string) 2022(defun epg--decode-percent-escape (string)
2023 (setq string (string-to-unibyte string)) 2023 (setq string (string-to-unibyte string))
2024 (let ((index 0)) 2024 (let ((index 0))
2025 (while (string-match "%\\(\\(%\\)\\|\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\)" 2025 (while (string-match "%\\(\\(%\\)\\|\\([[:xdigit:]][[:xdigit:]]\\)\\)"
2026 string index) 2026 string index)
2027 (if (match-beginning 2) 2027 (if (match-beginning 2)
2028 (setq string (replace-match "%" t t string) 2028 (setq string (replace-match "%" t t string)
@@ -2039,7 +2039,7 @@ If you are unsure, use synchronous version of this function
2039 2039
2040(defun epg--decode-hexstring (string) 2040(defun epg--decode-hexstring (string)
2041 (let ((index 0)) 2041 (let ((index 0))
2042 (while (eq index (string-match "[0-9A-Fa-f][0-9A-Fa-f]" string index)) 2042 (while (eq index (string-match "[[:xdigit:]][[:xdigit:]]" string index))
2043 (setq string (replace-match (string (string-to-number 2043 (setq string (replace-match (string (string-to-number
2044 (match-string 0 string) 16)) 2044 (match-string 0 string) 16))
2045 t t string) 2045 t t string)
@@ -2049,7 +2049,7 @@ If you are unsure, use synchronous version of this function
2049(defun epg--decode-quotedstring (string) 2049(defun epg--decode-quotedstring (string)
2050 (let ((index 0)) 2050 (let ((index 0))
2051 (while (string-match "\\\\\\(\\([,=+<>#;\\\"]\\)\\|\ 2051 (while (string-match "\\\\\\(\\([,=+<>#;\\\"]\\)\\|\
2052\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\)" 2052\\([[:xdigit:]][[:xdigit:]]\\)\\)"
2053 string index) 2053 string index)
2054 (if (match-beginning 2) 2054 (if (match-beginning 2)
2055 (setq string (replace-match "\\2" t nil string) 2055 (setq string (replace-match "\\2" t nil string)
@@ -2086,7 +2086,7 @@ The return value is an alist mapping from types to values."
2086 string index)) 2086 string index))
2087 (setq index (match-end 0) 2087 (setq index (match-end 0)
2088 value (epg--decode-quotedstring (match-string 0 string))) 2088 value (epg--decode-quotedstring (match-string 0 string)))
2089 (if (eq index (string-match "#\\([0-9A-Fa-f]+\\)" string index)) 2089 (if (eq index (string-match "#\\([[:xdigit:]]+\\)" string index))
2090 (setq index (match-end 0) 2090 (setq index (match-end 0)
2091 value (epg--decode-hexstring (match-string 1 string))) 2091 value (epg--decode-hexstring (match-string 1 string)))
2092 (if (eq index (string-match "\"\\([^\\\"]\\|\\\\.\\)*\"" 2092 (if (eq index (string-match "\"\\([^\\\"]\\|\\\\.\\)*\""
diff --git a/lisp/faces.el b/lisp/faces.el
index 89b598669c9..f9e8c6c58b8 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1997,7 +1997,7 @@ resulting color name in the echo area."
1997 (when (and convert-to-RGB 1997 (when (and convert-to-RGB
1998 (not (string-equal color ""))) 1998 (not (string-equal color "")))
1999 (let ((components (x-color-values color))) 1999 (let ((components (x-color-values color)))
2000 (unless (string-match-p "^#\\(?:[a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\)+$" color) 2000 (unless (string-match-p "^#\\(?:[[:xdigit:]][[:xdigit:]][[:xdigit:]]\\)+$" color)
2001 (setq color (format "#%04X%04X%04X" 2001 (setq color (format "#%04X%04X%04X"
2002 (logand 65535 (nth 0 components)) 2002 (logand 65535 (nth 0 components))
2003 (logand 65535 (nth 1 components)) 2003 (logand 65535 (nth 1 components))
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 601ea00810d..42e1a821b90 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -7423,10 +7423,10 @@ must return `mid', `mail', `invalid' or `ask'."
7423 (-2.0 . "^[0-9]") 7423 (-2.0 . "^[0-9]")
7424 (-1.0 . "^[0-9][0-9]") 7424 (-1.0 . "^[0-9][0-9]")
7425 ;; 7425 ;;
7426 ;; -3.0 /^[0-9][0-9a-fA-F]{2,2}/; 7426 ;; -3.0 /^[0-9][[:xdigit:]]{2,2}/;
7427 (-3.0 . "^[0-9][0-9a-fA-F][0-9a-fA-F][^0-9a-fA-F]") 7427 (-3.0 . "^[0-9][[:xdigit:]][[:xdigit:]][^[:xdigit:]]")
7428 ;; -5.0 /^[0-9][0-9a-fA-F]{3,3}/; 7428 ;; -5.0 /^[0-9][[:xdigit:]]{3,3}/;
7429 (-5.0 . "^[0-9][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][^0-9a-fA-F]") 7429 (-5.0 . "^[0-9][[:xdigit:]][[:xdigit:]][[:xdigit:]][^[:xdigit:]]")
7430 ;; 7430 ;;
7431 (-3.0 . "[0-9][0-9][0-9][0-9][0-9][^0-9].*@") ;; "[0-9]{5,}.*\@" 7431 (-3.0 . "[0-9][0-9][0-9][0-9][0-9][^0-9].*@") ;; "[0-9]{5,}.*\@"
7432 (-3.0 . "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][^0-9].*@") 7432 (-3.0 . "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][^0-9].*@")
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el
index db7489fbf1c..02a27b367cd 100644
--- a/lisp/gnus/mml-sec.el
+++ b/lisp/gnus/mml-sec.el
@@ -725,7 +725,7 @@ Otherwise, NAME is treated as user ID, for which no keys are returned if it
725is expired or revoked. 725is expired or revoked.
726If optional JUSTONE is not nil, return the first key instead of a list." 726If optional JUSTONE is not nil, return the first key instead of a list."
727 (let* ((keys (epg-list-keys context name)) 727 (let* ((keys (epg-list-keys context name))
728 (iskeyid (string-match "\\(0x\\)?\\([0-9a-fA-F]\\{8,\\}\\)" name)) 728 (iskeyid (string-match "\\(0x\\)?\\([[:xdigit:]]\\{8,\\}\\)" name))
729 (fingerprint (match-string 2 name)) 729 (fingerprint (match-string 2 name))
730 result) 730 result)
731 (when (and iskeyid (>= (length keys) 2)) 731 (when (and iskeyid (>= (length keys) 2))
diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el
index f64007aaf79..c3d511bc6e0 100644
--- a/lisp/gnus/nneething.el
+++ b/lisp/gnus/nneething.el
@@ -297,7 +297,7 @@ included.")
297(defun nneething-decode-file-name (file &optional coding-system) 297(defun nneething-decode-file-name (file &optional coding-system)
298 "Decode the name of the FILE is encoded in CODING-SYSTEM." 298 "Decode the name of the FILE is encoded in CODING-SYSTEM."
299 (let ((pos 0) buf) 299 (let ((pos 0) buf)
300 (while (string-match "%\\([0-9a-fA-F][0-9a-fA-F]\\)" file pos) 300 (while (string-match "%\\([[:xdigit:]][[:xdigit:]]\\)" file pos)
301 (setq buf (cons (string (string-to-number (match-string 1 file) 16)) 301 (setq buf (cons (string (string-to-number (match-string 1 file) 16))
302 (cons (substring file pos (match-beginning 0)) buf)) 302 (cons (substring file pos (match-beginning 0)) buf))
303 pos (match-end 0))) 303 pos (match-end 0)))
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index c7414a20be8..dfba025742a 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -566,7 +566,7 @@ therefore no longer care about) will be invalid at any time.\n
566(defvar hfy-tmpfont-stack nil 566(defvar hfy-tmpfont-stack nil
567 "An alist of derived fonts resulting from overlays.") 567 "An alist of derived fonts resulting from overlays.")
568 568
569(defconst hfy-hex-regex "[0-9A-Fa-f]") 569(defconst hfy-hex-regex "[[:xdigit:]]")
570 570
571(defconst hfy-triplet-regex 571(defconst hfy-triplet-regex
572 (concat 572 (concat
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 47b07479c3c..1edf80d14c8 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -3079,7 +3079,7 @@ as names, not numbers."
3079 (char 3079 (char
3080 (cond 3080 (cond
3081 ((char-from-name input t)) 3081 ((char-from-name input t))
3082 ((string-match-p "\\`[0-9a-fA-F]+\\'" input) 3082 ((string-match-p "\\`[[:xdigit:]]+\\'" input)
3083 (ignore-errors (string-to-number input 16))) 3083 (ignore-errors (string-to-number input 16)))
3084 ((string-match-p "\\`#\\([bBoOxX]\\|[0-9]+[rR]\\)[0-9a-zA-Z]+\\'" 3084 ((string-match-p "\\`#\\([bBoOxX]\\|[0-9]+[rR]\\)[0-9a-zA-Z]+\\'"
3085 input) 3085 input)
diff --git a/lisp/mail/rfc2231.el b/lisp/mail/rfc2231.el
index 0a0983c25f8..6ddb2964e51 100644
--- a/lisp/mail/rfc2231.el
+++ b/lisp/mail/rfc2231.el
@@ -223,7 +223,7 @@ These look like:
223 (mm-with-unibyte-buffer 223 (mm-with-unibyte-buffer
224 (insert value) 224 (insert value)
225 (goto-char (point-min)) 225 (goto-char (point-min))
226 (while (re-search-forward "%\\([0-9A-Fa-f][0-9A-Fa-f]\\)" nil t) 226 (while (re-search-forward "%\\([[:xdigit:]][[:xdigit:]]\\)" nil t)
227 (insert 227 (insert
228 (prog1 228 (prog1
229 (string-to-number (match-string 1) 16) 229 (string-to-number (match-string 1) 16)
diff --git a/lisp/net/shr-color.el b/lisp/net/shr-color.el
index 2d6cf68d8ff..af0b99c76f4 100644
--- a/lisp/net/shr-color.el
+++ b/lisp/net/shr-color.el
@@ -235,7 +235,7 @@ Like rgb() or hsl()."
235 (cond 235 (cond
236 ;; Hexadecimal color: #abc or #aabbcc 236 ;; Hexadecimal color: #abc or #aabbcc
237 ((string-match 237 ((string-match
238 "\\(#[0-9a-fA-F]\\{3\\}[0-9a-fA-F]\\{3\\}?\\)" 238 "\\(#[[:xdigit:]]\\{3\\}[[:xdigit:]]\\{3\\}?\\)"
239 color) 239 color)
240 (match-string 1 color)) 240 (match-string 1 color))
241 ;; rgb() or rgba() colors 241 ;; rgb() or rgba() colors
diff --git a/lisp/nxml/nxml-maint.el b/lisp/nxml/nxml-maint.el
index 2956efb736e..c524567a5b2 100644
--- a/lisp/nxml/nxml-maint.el
+++ b/lisp/nxml/nxml-maint.el
@@ -34,10 +34,10 @@
34 (let (lst head) 34 (let (lst head)
35 (with-current-buffer (find-file-noselect file) 35 (with-current-buffer (find-file-noselect file)
36 (goto-char (point-min)) 36 (goto-char (point-min))
37 (while (re-search-forward "^ *\\([a-fA-F0-9]\\{2\\}\\)[ \t]+" nil t) 37 (while (re-search-forward "^ *\\([[:xdigit:]]\\{2\\}\\)[ \t]+" nil t)
38 (let ((row (match-string 1)) 38 (let ((row (match-string 1))
39 (eol (line-end-position))) 39 (eol (line-end-position)))
40 (while (re-search-forward "\\([a-fA-F0-9]\\{2\\}\\)-\\([a-fA-F0-9]\\{2\\}\\)\\|\\([a-fA-F0-9]\\{2\\}\\)" eol t) 40 (while (re-search-forward "\\([[:xdigit:]]\\{2\\}\\)-\\([[:xdigit:]]\\{2\\}\\)\\|\\([[:xdigit:]]\\{2\\}\\)" eol t)
41 (setq lst 41 (setq lst
42 (cons (if (match-beginning 3) 42 (cons (if (match-beginning 3)
43 (concat "#x" row (match-string 3)) 43 (concat "#x" row (match-string 3))
diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el
index d36f9d92f26..60c871990e1 100644
--- a/lisp/nxml/rng-cmpct.el
+++ b/lisp/nxml/rng-cmpct.el
@@ -369,7 +369,7 @@ OVERRIDE is either nil, require or t."
369 (and pos 369 (and pos
370 (rng-c-error "Nul character found (binary file?)"))) 370 (rng-c-error "Nul character found (binary file?)")))
371 (let ((offset 0)) 371 (let ((offset 0))
372 (while (re-search-forward "\\\\x+{\\([0-9a-fA-F]+\\)}" 372 (while (re-search-forward "\\\\x+{\\([[:xdigit:]]+\\)}"
373 (point-max) 373 (point-max)
374 t) 374 t)
375 (let* ((ch (decode-char 'ucs (string-to-number (match-string 1) 16)))) 375 (let* ((ch (decode-char 'ucs (string-to-number (match-string 1) 16))))
diff --git a/lisp/nxml/rng-uri.el b/lisp/nxml/rng-uri.el
index 798475bbc3d..5a67cc7f145 100644
--- a/lisp/nxml/rng-uri.el
+++ b/lisp/nxml/rng-uri.el
@@ -68,7 +68,7 @@ Signal an error if URI is not a valid file URL."
68 68
69;; pattern is either nil or match or replace 69;; pattern is either nil or match or replace
70(defun rng-uri-file-name-1 (uri pattern) 70(defun rng-uri-file-name-1 (uri pattern)
71 (unless (string-match "\\`\\(?:[^%]\\|%[0-9a-fA-F]{2}\\)*\\'" uri) 71 (unless (string-match "\\`\\(?:[^%]\\|%[[:xdigit:]]{2}\\)*\\'" uri)
72 (rng-uri-error "Bad escapes in URI `%s'" uri)) 72 (rng-uri-error "Bad escapes in URI `%s'" uri))
73 (setq uri (rng-uri-unescape-multibyte uri)) 73 (setq uri (rng-uri-unescape-multibyte uri))
74 (let* ((components 74 (let* ((components
@@ -299,7 +299,7 @@ Both FULL and BASE must be absolute URIs."
299 (mapconcat 'identity segments "/"))) 299 (mapconcat 'identity segments "/")))
300 300
301(defun rng-uri-unescape-multibyte (str) 301(defun rng-uri-unescape-multibyte (str)
302 (replace-regexp-in-string "\\(?:%[89a-fA-F][0-9a-fA-F]\\)+" 302 (replace-regexp-in-string "\\(?:%[89a-fA-F][[:xdigit:]]\\)+"
303 'rng-multibyte-percent-decode 303 'rng-multibyte-percent-decode
304 str)) 304 str))
305 305
@@ -310,7 +310,7 @@ Both FULL and BASE must be absolute URIs."
310 'utf-8)) 310 'utf-8))
311 311
312(defun rng-uri-unescape-unibyte (str) 312(defun rng-uri-unescape-unibyte (str)
313 (replace-regexp-in-string "%[0-7][0-9a-fA-F]" 313 (replace-regexp-in-string "%[0-7][[:xdigit:]]"
314 (lambda (h) 314 (lambda (h)
315 (string-to-number (substring h 1) 16)) 315 (string-to-number (substring h 1) 16))
316 str 316 str
@@ -318,7 +318,7 @@ Both FULL and BASE must be absolute URIs."
318 t)) 318 t))
319 319
320(defun rng-uri-unescape-unibyte-match (str) 320(defun rng-uri-unescape-unibyte-match (str)
321 (replace-regexp-in-string "%[0-7][0-9a-fA-F]\\|[^%]" 321 (replace-regexp-in-string "%[0-7][[:xdigit:]]\\|[^%]"
322 (lambda (match) 322 (lambda (match)
323 (if (string= match "*") 323 (if (string= match "*")
324 "\\([^/]*\\)" 324 "\\([^/]*\\)"
@@ -333,7 +333,7 @@ Both FULL and BASE must be absolute URIs."
333 333
334(defun rng-uri-unescape-unibyte-replace (str next-match-index) 334(defun rng-uri-unescape-unibyte-replace (str next-match-index)
335 (replace-regexp-in-string 335 (replace-regexp-in-string
336 "%[0-7][0-9a-fA-F]\\|[^%]" 336 "%[0-7][[:xdigit:]]\\|[^%]"
337 (lambda (match) 337 (lambda (match)
338 (if (string= match "*") 338 (if (string= match "*")
339 (let ((n next-match-index)) 339 (let ((n next-match-index))
diff --git a/lisp/nxml/rng-xsd.el b/lisp/nxml/rng-xsd.el
index f308b049f3b..582d08e149f 100644
--- a/lisp/nxml/rng-xsd.el
+++ b/lisp/nxml/rng-xsd.el
@@ -330,7 +330,7 @@ trailing digits. For example, -0021.0430 would be represented by [-1
330 (match-string 1 string))) 330 (match-string 1 string)))
331 331
332(defun rng-xsd-convert-hex-binary (string) 332(defun rng-xsd-convert-hex-binary (string)
333 (and (string-match "\\`[ \r\n\t]*\\(\\(?:[0-9A-Fa-f][0-9A-Fa-f]\\)*\\)[ \r\n\t]*\\'" 333 (and (string-match "\\`[ \r\n\t]*\\(\\(?:[[:xdigit:]][[:xdigit:]]\\)*\\)[ \r\n\t]*\\'"
334 string) 334 string)
335 (downcase (match-string 1 string)))) 335 (downcase (match-string 1 string))))
336 336
@@ -360,7 +360,7 @@ trailing digits. For example, -0021.0430 would be represented by [-1
360 n))) 360 n)))
361 361
362(defun rng-xsd-convert-any-uri (string) 362(defun rng-xsd-convert-any-uri (string)
363 (and (string-match "\\`\\(?:[^%]\\|%[0-9a-fA-F][0-9a-fA-F]\\)*\\'" string) 363 (and (string-match "\\`\\(?:[^%]\\|%[[:xdigit:]][[:xdigit:]]\\)*\\'" string)
364 (string-match "\\`[^#]*\\(?:#[^#]*\\)?\\'" string) 364 (string-match "\\`[^#]*\\(?:#[^#]*\\)?\\'" string)
365 (string-match "\\`\\(?:[a-zA-Z][-+.A-Za-z0-9]*:.+\\|[^:]*\\(?:[#/?].*\\)?\\)\\'" string) 365 (string-match "\\`\\(?:[a-zA-Z][-+.A-Za-z0-9]*:.+\\|[^:]*\\(?:[#/?].*\\)?\\)\\'" string)
366 string)) 366 string))
diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el
index afa33e064f3..3cab5ed9b7b 100644
--- a/lisp/nxml/xmltok.el
+++ b/lisp/nxml/xmltok.el
@@ -413,7 +413,7 @@ and VALUE-END, otherwise a STRING giving the value."
413 (xmltok-g decimal-ref-close ";") opt)) 413 (xmltok-g decimal-ref-close ";") opt))
414 (hex-ref 414 (hex-ref
415 (xmltok+ "x" open 415 (xmltok+ "x" open
416 (xmltok-g hex "[0-9a-fA-F]" +) 416 (xmltok-g hex "[[:xdigit:]]" +)
417 (xmltok-g hex-ref-close ";") opt 417 (xmltok-g hex-ref-close ";") opt
418 close opt)) 418 close opt))
419 (char-ref 419 (char-ref
diff --git a/lisp/nxml/xsd-regexp.el b/lisp/nxml/xsd-regexp.el
index 7ae169c19c6..c002e6fd9fb 100644
--- a/lisp/nxml/xsd-regexp.el
+++ b/lisp/nxml/xsd-regexp.el
@@ -702,7 +702,7 @@ Code is inserted into the current buffer."
702 (with-current-buffer (find-file-noselect file) 702 (with-current-buffer (find-file-noselect file)
703 (goto-char (point-min)) 703 (goto-char (point-min))
704 (mapc (lambda (x) (put x 'xsdre-ranges nil)) xsdre-gen-categories) 704 (mapc (lambda (x) (put x 'xsdre-ranges nil)) xsdre-gen-categories)
705 (while (re-search-forward "^\\([0-9A-Fa-f]*\\);[^;]*;\\([A-Z][a-z]\\);" 705 (while (re-search-forward "^\\([[:xdigit:]]*\\);[^;]*;\\([A-Z][a-z]\\);"
706 nil 706 nil
707 t) 707 t)
708 (let* ((sym (intern (match-string-no-properties 2))) 708 (let* ((sym (intern (match-string-no-properties 2)))
diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el
index 8b4e8953889..a1552606eb5 100644
--- a/lisp/org/org-mobile.el
+++ b/lisp/org/org-mobile.el
@@ -472,7 +472,7 @@ agenda view showing the flagged items."
472 (concat (shell-quote-argument org-mobile-checksum-binary) 472 (concat (shell-quote-argument org-mobile-checksum-binary)
473 " " 473 " "
474 (shell-quote-argument (expand-file-name file))))) 474 (shell-quote-argument (expand-file-name file)))))
475 (when (string-match "[a-fA-F0-9]\\{30,40\\}" check) 475 (when (string-match "[[:xdigit:]]\\{30,40\\}" check)
476 (push (cons link-name (match-string 0 check)) 476 (push (cons link-name (match-string 0 check))
477 org-mobile-checksum-files)))) 477 org-mobile-checksum-files))))
478 478
@@ -761,7 +761,7 @@ If nothing new has been added, return nil."
761 (buffer (find-file-noselect file))) 761 (buffer (find-file-noselect file)))
762 (when buffer 762 (when buffer
763 (with-current-buffer buffer 763 (with-current-buffer buffer
764 (when (re-search-forward (concat "\\([0-9a-fA-F]\\{30,\\}\\).*?" 764 (when (re-search-forward (concat "\\([[:xdigit:]]\\{30,\\}\\).*?"
765 (regexp-quote org-mobile-capture-file) 765 (regexp-quote org-mobile-capture-file)
766 "[ \t]*$") nil t) 766 "[ \t]*$") nil t)
767 (goto-char (match-beginning 1)) 767 (goto-char (match-beginning 1))
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index 147527da1d3..513a534d9b5 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -155,7 +155,7 @@ table, obtained by prompting the user."
155 :type 'string) 155 :type 'string)
156 156
157(defcustom org-table-number-regexp 157(defcustom org-table-number-regexp
158 "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%:]*\\|[<>]?[-+]?0[xX][0-9a-fA-F.]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$" 158 "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%:]*\\|[<>]?[-+]?0[xX][[:xdigit:].]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$"
159 "Regular expression for recognizing numbers in table columns. 159 "Regular expression for recognizing numbers in table columns.
160If a table column contains mostly numbers, it will be aligned to the 160If a table column contains mostly numbers, it will be aligned to the
161right. If not, it will be aligned to the left. 161right. If not, it will be aligned to the left.
@@ -180,9 +180,9 @@ Other options offered by the customize interface are more restrictive."
180 (const :tag "Exponential, Floating point, Integer" 180 (const :tag "Exponential, Floating point, Integer"
181 "^[-+]?[0-9.]+\\([eEdD][-+0-9]+\\)?$") 181 "^[-+]?[0-9.]+\\([eEdD][-+0-9]+\\)?$")
182 (const :tag "Very General Number-Like, including hex and Calc radix" 182 (const :tag "Very General Number-Like, including hex and Calc radix"
183 "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][0-9a-fA-F.]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$") 183 "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][[:xdigit:].]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$")
184 (const :tag "Very General Number-Like, including hex and Calc radix, allows comma as decimal mark" 184 (const :tag "Very General Number-Like, including hex and Calc radix, allows comma as decimal mark"
185 "^\\([<>]?[-+^.,0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][0-9a-fA-F.]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$") 185 "^\\([<>]?[-+^.,0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][[:xdigit:].]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$")
186 (string :tag "Regexp:"))) 186 (string :tag "Regexp:")))
187 187
188(defcustom org-table-number-fraction 0.5 188(defcustom org-table-number-fraction 0.5
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index 77c1e5e2d87..404e704373e 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -909,7 +909,7 @@ the 4 file locations can be clicked on and jumped to."
909 change)) 909 change))
910 (replace-match "'A'")) 910 (replace-match "'A'"))
911 (goto-char from) 911 (goto-char from)
912 (while (re-search-forward "\\(#[0-9a-fA-F]*#\\)" to t) 912 (while (re-search-forward "\\(#[[:xdigit:]]*#\\)" to t)
913 (setq change (cons (list (match-beginning 1) 913 (setq change (cons (list (match-beginning 1)
914 (length (match-string 1)) 914 (length (match-string 1))
915 (match-string 1)) 915 (match-string 1))
@@ -1013,7 +1013,7 @@ If PARSE-RESULT is non-nil, use it instead of calling `parse-partial-sexp'."
1013 1013
1014(defsubst ada-in-numeric-literal-p () 1014(defsubst ada-in-numeric-literal-p ()
1015 "Return t if point is after a prefix of a numeric literal." 1015 "Return t if point is after a prefix of a numeric literal."
1016 (looking-back "\\([0-9]+#[0-9a-fA-F_]+\\)" (line-beginning-position))) 1016 (looking-back "\\([0-9]+#[[:xdigit:]_]+\\)" (line-beginning-position)))
1017 1017
1018;;------------------------------------------------------------------ 1018;;------------------------------------------------------------------
1019;; Contextual menus 1019;; Contextual menus
@@ -5213,7 +5213,7 @@ Return nil if no body was found."
5213 '("<<\\(\\sw+\\)>>" 1 font-lock-constant-face) 5213 '("<<\\(\\sw+\\)>>" 1 font-lock-constant-face)
5214 5214
5215 ;; Highlight based-numbers (R. Reagan <robin-reply@reagans.org>) 5215 ;; Highlight based-numbers (R. Reagan <robin-reply@reagans.org>)
5216 (list "\\([0-9]+#[0-9a-fA-F_]+#\\)" '(1 font-lock-constant-face t)) 5216 (list "\\([0-9]+#[[:xdigit:]_]+#\\)" '(1 font-lock-constant-face t))
5217 5217
5218 ;; Ada unnamed numerical constants 5218 ;; Ada unnamed numerical constants
5219 (list "\\W\\([-+]?[0-9._]+\\)\\>" '(1 font-lock-constant-face)) 5219 (list "\\W\\([-+]?[0-9._]+\\)\\>" '(1 font-lock-constant-face))
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 568fceece24..b45c2e5fd38 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1513,7 +1513,7 @@ Note that the style variables are always made local to the buffer."
1513(defconst c-maybe-quoted-number-head 1513(defconst c-maybe-quoted-number-head
1514 (concat 1514 (concat
1515 "\\(0\\(" 1515 "\\(0\\("
1516 "\\([Xx]\\([0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*'?\\)?\\)" 1516 "\\([Xx]\\([[:xdigit:]]\\('[[:xdigit:]]\\|[[:xdigit:]]\\)*'?\\)?\\)"
1517 "\\|" 1517 "\\|"
1518 "\\([Bb]\\([01]\\('[01]\\|[01]\\)*'?\\)?\\)" 1518 "\\([Bb]\\([01]\\('[01]\\|[01]\\)*'?\\)?\\)"
1519 "\\|" 1519 "\\|"
@@ -1533,7 +1533,7 @@ Note that the style variables are always made local to the buffer."
1533 (save-excursion 1533 (save-excursion
1534 (let ((here (point)) 1534 (let ((here (point))
1535 found) 1535 found)
1536 (skip-chars-backward "0-9a-fA-F'") 1536 (skip-chars-backward "[:xdigit:]'")
1537 (if (and (memq (char-before) '(?x ?X)) 1537 (if (and (memq (char-before) '(?x ?X))
1538 (eq (char-before (1- (point))) ?0)) 1538 (eq (char-before (1- (point))) ?0))
1539 (backward-char 2)) 1539 (backward-char 2))
@@ -1547,7 +1547,7 @@ Note that the style variables are always made local to the buffer."
1547(defconst c-maybe-quoted-number-tail 1547(defconst c-maybe-quoted-number-tail
1548 (concat 1548 (concat
1549 "\\(" 1549 "\\("
1550 "\\([xX']?[0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*\\)" 1550 "\\([xX']?[[:xdigit:]]\\('[[:xdigit:]]\\|[[:xdigit:]]\\)*\\)"
1551 "\\|" 1551 "\\|"
1552 "\\([bB']?[01]\\('[01]\\|[01]\\)*\\)" 1552 "\\([bB']?[01]\\('[01]\\|[01]\\)*\\)"
1553 "\\|" 1553 "\\|"
@@ -1567,7 +1567,7 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
1567(defconst c-maybe-quoted-number 1567(defconst c-maybe-quoted-number
1568 (concat 1568 (concat
1569 "\\(0\\(" 1569 "\\(0\\("
1570 "\\([Xx][0-9a-fA-F]\\('[0-9a-fA-F]\\|[0-9a-fA-F]\\)*\\)" 1570 "\\([Xx][[:xdigit:]]\\('[[:xdigit:]]\\|[[:xdigit:]]\\)*\\)"
1571 "\\|" 1571 "\\|"
1572 "\\([Bb][01]\\('[01]\\|[01]\\)*\\)" 1572 "\\([Bb][01]\\('[01]\\|[01]\\)*\\)"
1573 "\\|" 1573 "\\|"
@@ -1585,9 +1585,9 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
1585 (when c-has-quoted-numbers 1585 (when c-has-quoted-numbers
1586 (save-excursion 1586 (save-excursion
1587 (let ((here (point)) 1587 (let ((here (point))
1588 (bound (progn (skip-chars-forward "0-9a-fA-F'") (point)))) 1588 (bound (progn (skip-chars-forward "[:xdigit:]'") (point))))
1589 (goto-char here) 1589 (goto-char here)
1590 (when (< (skip-chars-backward "0-9a-fA-F'") 0) 1590 (when (< (skip-chars-backward "[:xdigit:]'") 0)
1591 (if (and (memq (char-before) '(?x ?X)) 1591 (if (and (memq (char-before) '(?x ?X))
1592 (eq (char-before (1- (point))) ?0)) 1592 (eq (char-before (1- (point))) ?0))
1593 (backward-char 2)) 1593 (backward-char 2))
@@ -1628,7 +1628,7 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
1628 (if (>= (point) c-new-BEG) 1628 (if (>= (point) c-new-BEG)
1629 (setq c-new-BEG (match-beginning 0)))) 1629 (setq c-new-BEG (match-beginning 0))))
1630 ((looking-at 1630 ((looking-at
1631 "\\([^'\\]\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\\)'") 1631 "\\([^'\\]\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][[:xdigit:]]+\\|.\\)\\)'")
1632 (goto-char (match-end 0)) 1632 (goto-char (match-end 0))
1633 (if (> (match-end 0) c-new-BEG) 1633 (if (> (match-end 0) c-new-BEG)
1634 (setq c-new-BEG (1- (match-beginning 0))))) 1634 (setq c-new-BEG (1- (match-beginning 0)))))
@@ -1657,7 +1657,7 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
1657 (if (> (match-end 0) c-new-END) 1657 (if (> (match-end 0) c-new-END)
1658 (setq c-new-END (match-end 0)))) 1658 (setq c-new-END (match-end 0))))
1659 ((looking-at 1659 ((looking-at
1660 "\\([^'\\]\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\\)'") 1660 "\\([^'\\]\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][[:xdigit:]]+\\|.\\)\\)'")
1661 (goto-char (match-end 0)) 1661 (goto-char (match-end 0))
1662 (if (> (match-end 0) c-new-END) 1662 (if (> (match-end 0) c-new-END)
1663 (setq c-new-END (match-end 0)))) 1663 (setq c-new-END (match-end 0))))
@@ -1677,8 +1677,8 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
1677 ((c-quoted-number-tail-after-point) 1677 ((c-quoted-number-tail-after-point)
1678 (setq c-new-END (match-end 0))) 1678 (setq c-new-END (match-end 0)))
1679 ((looking-at 1679 ((looking-at
1680 "\\(\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\\|.\\)?\ 1680 "\\(\\\\\\([0-7]\\{1,3\\}\\|[xuU][[:xdigit:]]+\\|.\\)\\|.\\)?\
1681\\('\\([^'\\]\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\\)\\)*'") 1681\\('\\([^'\\]\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][[:xdigit:]]+\\|.\\)\\)\\)*'")
1682 (setq c-new-END (match-end 0)))) 1682 (setq c-new-END (match-end 0))))
1683 1683
1684 ;; Remove the '(1) syntax-table property from any "'"s within (c-new-BEG 1684 ;; Remove the '(1) syntax-table property from any "'"s within (c-new-BEG
@@ -1730,7 +1730,7 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
1730 'c-digit-separator t ?') 1730 'c-digit-separator t ?')
1731 (goto-char num-end)) 1731 (goto-char num-end))
1732 ((looking-at 1732 ((looking-at
1733 "\\([^\\']\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\ 1733 "\\([^\\']\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][[:xdigit:]]+\\|.\\)\
1734\\)'") ; balanced quoted expression. 1734\\)'") ; balanced quoted expression.
1735 (goto-char (match-end 0))) 1735 (goto-char (match-end 0)))
1736 ((looking-at "\\\\'") ; Anomalous construct. 1736 ((looking-at "\\\\'") ; Anomalous construct.
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 254269ddf1a..1aa79817916 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -3463,18 +3463,18 @@ Should be called with the point before leading colon of an attribute."
3463(defsubst cperl-highlight-charclass (endbracket dashface bsface onec-space) 3463(defsubst cperl-highlight-charclass (endbracket dashface bsface onec-space)
3464 (let ((l '(1 5 7)) ll lle lll 3464 (let ((l '(1 5 7)) ll lle lll
3465 ;; 2 groups, the first takes the whole match (include \[trnfabe]) 3465 ;; 2 groups, the first takes the whole match (include \[trnfabe])
3466 (singleChar (concat "\\(" "[^\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" "\\|" "\\\\c." "\\|" "\\\\x" "\\([0-9a-fA-F][0-9a-fA-F]?\\|\\={[0-9a-fA-F]+}\\)" "\\|" "\\\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)"))) 3466 (singleChar (concat "\\(" "[^\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" "\\|" "\\\\c." "\\|" "\\\\x" "\\([[:xdigit:]][[:xdigit:]]?\\|\\={[[:xdigit:]]+}\\)" "\\|" "\\\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)")))
3467 (while ; look for unescaped - between non-classes 3467 (while ; look for unescaped - between non-classes
3468 (re-search-forward 3468 (re-search-forward
3469 ;; On 19.33, certain simplifications lead 3469 ;; On 19.33, certain simplifications lead
3470 ;; to bugs (as in [^a-z] \\| [trnfabe] ) 3470 ;; to bugs (as in [^a-z] \\| [trnfabe] )
3471 (concat ; 1: SingleChar (include \[trnfabe]) 3471 (concat ; 1: SingleChar (include \[trnfabe])
3472 singleChar 3472 singleChar
3473 ;;"\\(" "[^\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" "\\|" "\\\\c." "\\|" "\\\\x" "\\([0-9a-fA-F][0-9a-fA-F]?\\|\\={[0-9a-fA-F]+}\\)" "\\|" "\\\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)" 3473 ;;"\\(" "[^\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" "\\|" "\\\\c." "\\|" "\\\\x" "\\([[:xdigit:]][[:xdigit:]]?\\|\\={[[:xdigit:]]+}\\)" "\\|" "\\\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)"
3474 "\\(" ; 3: DASH SingleChar (match optionally) 3474 "\\(" ; 3: DASH SingleChar (match optionally)
3475 "\\(-\\)" ; 4: DASH 3475 "\\(-\\)" ; 4: DASH
3476 singleChar ; 5: SingleChar 3476 singleChar ; 5: SingleChar
3477 ;;"\\(" "[^\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" "\\|" "\\\\c." "\\|" "\\\\x" "\\([0-9a-fA-F][0-9a-fA-F]?\\|\\={[0-9a-fA-F]+}\\)" "\\|" "\\\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)" 3477 ;;"\\(" "[^\\]" "\\|" "\\\\[^cdg-mo-qsu-zA-Z0-9_]" "\\|" "\\\\c." "\\|" "\\\\x" "\\([[:xdigit:]][[:xdigit:]]?\\|\\={[[:xdigit:]]+}\\)" "\\|" "\\\\0?[0-7][0-7]?[0-7]?" "\\|" "\\\\N{[^{}]*}" "\\)"
3478 "\\)?" 3478 "\\)?"
3479 "\\|" 3479 "\\|"
3480 "\\(" ; 7: other escapes 3480 "\\(" ; 7: other escapes
@@ -4368,7 +4368,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
4368 "\\=[0123456789]*" (1- e) 'to-end)) 4368 "\\=[0123456789]*" (1- e) 'to-end))
4369 (and (eq qtag ?x) 4369 (and (eq qtag ?x)
4370 (re-search-forward 4370 (re-search-forward
4371 "\\=[0-9a-fA-F][0-9a-fA-F]?\\|\\={[0-9a-fA-F]+}" 4371 "\\=[[:xdigit:]][[:xdigit:]]?\\|\\={[[:xdigit:]]+}"
4372 (1- e) 'to-end)) 4372 (1- e) 'to-end))
4373 (and (memq qtag (append "pPN" nil)) 4373 (and (memq qtag (append "pPN" nil))
4374 (re-search-forward "\\={[^{}]+}\\|." 4374 (re-search-forward "\\={[^{}]+}\\|."
diff --git a/lisp/progmodes/ebnf-abn.el b/lisp/progmodes/ebnf-abn.el
index 53d37b689f0..b00308591f8 100644
--- a/lisp/progmodes/ebnf-abn.el
+++ b/lisp/progmodes/ebnf-abn.el
@@ -640,7 +640,7 @@ See documentation for variable `ebnf-abn-lex'."
640 (let* ((char (following-char)) 640 (let* ((char (following-char))
641 (chars (cond ((or (= char ?B) (= char ?b)) "01") 641 (chars (cond ((or (= char ?B) (= char ?b)) "01")
642 ((or (= char ?D) (= char ?d)) "0-9") 642 ((or (= char ?D) (= char ?d)) "0-9")
643 ((or (= char ?X) (= char ?x)) "0-9A-Fa-f") 643 ((or (= char ?X) (= char ?x)) "[:xdigit:]")
644 (t (error "Invalid terminal value"))))) 644 (t (error "Invalid terminal value")))))
645 (forward-char) 645 (forward-char)
646 (or (> (skip-chars-forward chars ebnf-limit) 0) 646 (or (> (skip-chars-forward chars ebnf-limit) 0)
diff --git a/lisp/progmodes/ebnf-dtd.el b/lisp/progmodes/ebnf-dtd.el
index 94d96432614..74ff1f47d16 100644
--- a/lisp/progmodes/ebnf-dtd.el
+++ b/lisp/progmodes/ebnf-dtd.el
@@ -324,7 +324,7 @@
324;; /* Character Reference */ 324;; /* Character Reference */
325;; 325;;
326;; CharRef ::= '&#' [0-9]+ ';' 326;; CharRef ::= '&#' [0-9]+ ';'
327;; | '&#x' [0-9a-fA-F]+ ';' 327;; | '&#x' [[:xdigit:]]+ ';'
328;; [WFC: Legal Character] 328;; [WFC: Legal Character]
329;; 329;;
330;; 330;;
@@ -915,9 +915,9 @@
915;;; EntityRef ::= '&' Name ';' 915;;; EntityRef ::= '&' Name ';'
916;;; 916;;;
917;;; CharRef ::= '&#' [0-9]+ ';' 917;;; CharRef ::= '&#' [0-9]+ ';'
918;;; | '&#x' [0-9a-fA-F]+ ';' 918;;; | '&#x' [[:xdigit:]]+ ';'
919 919
920;;; "^\\(&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[0-9a-fA-F]+\\|[0-9]+\\)\\);\\|[^<&]\\)*$" 920;;; "^\\(&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[[:xdigit:]]+\\|[0-9]+\\)\\);\\|[^<&]\\)*$"
921 921
922 922
923(defun ebnf-dtd-attlistdecl () 923(defun ebnf-dtd-attlistdecl ()
@@ -945,7 +945,7 @@
945 (setq token (ebnf-dtd-lex))) 945 (setq token (ebnf-dtd-lex)))
946 (or (and (eq token 'string) 946 (or (and (eq token 'string)
947 (string-match 947 (string-match
948 "^\\(&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[0-9a-fA-F]+\\|[0-9]+\\)\\);\\|[^<&]\\)*$" 948 "^\\(&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[[:xdigit:]]+\\|[0-9]+\\)\\);\\|[^<&]\\)*$"
949 ebnf-dtd-lex)) 949 ebnf-dtd-lex))
950 (error "Invalid default value in ATTLIST declaration")))) 950 (error "Invalid default value in ATTLIST declaration"))))
951 (or (eq token 'end-decl) 951 (or (eq token 'end-decl)
@@ -986,9 +986,9 @@
986;;; EntityRef ::= '&' Name ';' 986;;; EntityRef ::= '&' Name ';'
987;;; 987;;;
988;;; CharRef ::= '&#' [0-9]+ ';' 988;;; CharRef ::= '&#' [0-9]+ ';'
989;;; | '&#x' [0-9a-fA-F]+ ';' 989;;; | '&#x' [[:xdigit:]]+ ';'
990 990
991;;; "^\\(%[A-Za-z_:][-A-Za-z0-9._:]*;\\|&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[0-9a-fA-F]+\\|[0-9]+\\)\\);\\|[^%&]\\)*$" 991;;; "^\\(%[A-Za-z_:][-A-Za-z0-9._:]*;\\|&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[[:xdigit:]]+\\|[0-9]+\\)\\);\\|[^%&]\\)*$"
992 992
993 993
994(defun ebnf-dtd-entitydecl () 994(defun ebnf-dtd-entitydecl ()
@@ -1001,7 +1001,7 @@
1001 (setq token (ebnf-dtd-lex)) 1001 (setq token (ebnf-dtd-lex))
1002 (if (eq token 'string) 1002 (if (eq token 'string)
1003 (if (string-match 1003 (if (string-match
1004 "^\\(%[A-Za-z_:][-A-Za-z0-9._:]*;\\|&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[0-9a-fA-F]+\\|[0-9]+\\)\\);\\|[^%&]\\)*$" 1004 "^\\(%[A-Za-z_:][-A-Za-z0-9._:]*;\\|&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[[:xdigit:]]+\\|[0-9]+\\)\\);\\|[^%&]\\)*$"
1005 ebnf-dtd-lex) 1005 ebnf-dtd-lex)
1006 (setq token (ebnf-dtd-lex)) 1006 (setq token (ebnf-dtd-lex))
1007 (error "Invalid ENTITY definition")) 1007 (error "Invalid ENTITY definition"))
@@ -1242,7 +1242,7 @@ See documentation for variable `ebnf-dtd-lex'."
1242 (setq ebnf-dtd-lex (if (/= (following-char) ?x) 1242 (setq ebnf-dtd-lex (if (/= (following-char) ?x)
1243 (ebnf-dtd-char-ref "&#" "0-9") 1243 (ebnf-dtd-char-ref "&#" "0-9")
1244 (forward-char) 1244 (forward-char)
1245 (ebnf-dtd-char-ref "&#x" "0-9a-fA-F"))) 1245 (ebnf-dtd-char-ref "&#x" "[:xdigit:]")))
1246 'char-ref)) 1246 'char-ref))
1247 ;; miscellaneous: (, ), [, ], =, |, *, +, >, `,' 1247 ;; miscellaneous: (, ), [, ], =, |, *, +, >, `,'
1248 (t 1248 (t
diff --git a/lisp/progmodes/ebnf-ebx.el b/lisp/progmodes/ebnf-ebx.el
index 25500f16186..dc1a60f3741 100644
--- a/lisp/progmodes/ebnf-ebx.el
+++ b/lisp/progmodes/ebnf-ebx.el
@@ -658,7 +658,7 @@ See documentation for variable `ebnf-ebx-lex'."
658 (or no-error 658 (or no-error
659 (error "Invalid hexadecimal character")) 659 (error "Invalid hexadecimal character"))
660 (forward-char) 660 (forward-char)
661 (or (> (skip-chars-forward "0-9A-Fa-f" ebnf-limit) 0) 661 (or (> (skip-chars-forward "[:xdigit:]" ebnf-limit) 0)
662 (error "Invalid hexadecimal character")))) 662 (error "Invalid hexadecimal character"))))
663 663
664 664
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 32b0b7551f9..1b06077005c 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -540,7 +540,7 @@ that form should be displayed.")
540 540
541(defconst hif-token-regexp 541(defconst hif-token-regexp
542 (concat (regexp-opt (mapcar 'car hif-token-alist)) 542 (concat (regexp-opt (mapcar 'car hif-token-alist))
543 "\\|0x[0-9a-fA-F]+\\.?[0-9a-fA-F]*" 543 "\\|0x[[:xdigit:]]+\\.?[[:xdigit:]]*"
544 "\\|[0-9]+\\.?[0-9]*" ;; decimal/octal 544 "\\|[0-9]+\\.?[0-9]*" ;; decimal/octal
545 "\\|\\w+")) 545 "\\|\\w+"))
546 546
@@ -595,7 +595,7 @@ that form should be displayed.")
595 ;; 1. postfix 'l', 'll', 'ul' and 'ull' 595 ;; 1. postfix 'l', 'll', 'ul' and 'ull'
596 ;; 2. floating number formats (like 1.23e4) 596 ;; 2. floating number formats (like 1.23e4)
597 ;; 3. 098 is interpreted as octal conversion error 597 ;; 3. 098 is interpreted as octal conversion error
598 (if (string-match "0x\\([0-9a-fA-F]+\\.?[0-9a-fA-F]*\\)" 598 (if (string-match "0x\\([[:xdigit:]]+\\.?[[:xdigit:]]*\\)"
599 token) 599 token)
600 (hif-string-to-number (match-string 1 token) 16)) ;; hex 600 (hif-string-to-number (match-string 1 token) 16)) ;; hex
601 (if (string-match "\\`0[0-9]+\\(\\.[0-9]+\\)?\\'" token) 601 (if (string-match "\\`0[0-9]+\\(\\.[0-9]+\\)?\\'" token)
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 296a7ac3c95..780eff2d8a0 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -1071,7 +1071,7 @@ VERSION is of the format (Major . Minor)"
1071 ;; Supposedly, ISO-Prolog wants \NNN\ for octal and \xNNN\ for hexadecimal 1071 ;; Supposedly, ISO-Prolog wants \NNN\ for octal and \xNNN\ for hexadecimal
1072 ;; escape sequences in atoms, so be careful not to let the terminating \ 1072 ;; escape sequences in atoms, so be careful not to let the terminating \
1073 ;; escape a subsequent quote. 1073 ;; escape a subsequent quote.
1074 ("\\\\[x0-7][0-9a-fA-F]*\\(\\\\\\)" (1 "_")) 1074 ("\\\\[x0-7][[:xdigit:]]*\\(\\\\\\)" (1 "_"))
1075 ))) 1075 )))
1076 1076
1077(defun prolog-mode-variables () 1077(defun prolog-mode-variables ()
diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el
index f34b21e4cf4..21d3db91ad3 100644
--- a/lisp/progmodes/vera-mode.el
+++ b/lisp/progmodes/vera-mode.el
@@ -635,7 +635,7 @@ Adapted from `font-lock-match-c-style-declaration-item-and-skip-to-next'."
635 (list (concat "^\\s-*" vera-rvm-types-regexp "\\s-*\\(\\[[^]]+\\]\\s-+\\)?") 635 (list (concat "^\\s-*" vera-rvm-types-regexp "\\s-*\\(\\[[^]]+\\]\\s-+\\)?")
636 '(vera-font-lock-match-item nil nil (1 font-lock-variable-name-face))) 636 '(vera-font-lock-match-item nil nil (1 font-lock-variable-name-face)))
637 ;; highlight numbers 637 ;; highlight numbers
638 '("\\([0-9]*'[bdoh][0-9a-fA-FxXzZ_]+\\)" 1 vera-font-lock-number) 638 '("\\([0-9]*'[bdoh][[:xdigit:]xXzZ_]+\\)" 1 vera-font-lock-number)
639 ;; highlight filenames in #include directives 639 ;; highlight filenames in #include directives
640 '("^#\\s-*include\\s-*\\(<[^>\"\n]*>?\\)" 640 '("^#\\s-*include\\s-*\\(<[^>\"\n]*>?\\)"
641 1 font-lock-string-face) 641 1 font-lock-string-face)
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 8ddd262af3e..4295f2e5a0d 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -2762,7 +2762,7 @@ find the errors."
2762 "\\s-*\\(\\<\\(reg\\|wire\\)\\>\\s-*\\)?\\(\\<\\(un\\)?signed\\>\\s-*\\)?\\(" verilog-range-re "\\)?")) 2762 "\\s-*\\(\\<\\(reg\\|wire\\)\\>\\s-*\\)?\\(\\<\\(un\\)?signed\\>\\s-*\\)?\\(" verilog-range-re "\\)?"))
2763(defconst verilog-macroexp-re "`\\sw+") 2763(defconst verilog-macroexp-re "`\\sw+")
2764 2764
2765(defconst verilog-delay-re "#\\s-*\\(\\([0-9_]+\\('s?[hdxbo][0-9a-fA-F_xz]+\\)?\\)\\|\\(([^()]*)\\)\\|\\(\\sw+\\)\\)") 2765(defconst verilog-delay-re "#\\s-*\\(\\([0-9_]+\\('s?[hdxbo][[:xdigit:]_xz]+\\)?\\)\\|\\(([^()]*)\\)\\|\\(\\sw+\\)\\)")
2766(defconst verilog-declaration-re-2-no-macro 2766(defconst verilog-declaration-re-2-no-macro
2767 (concat "\\s-*" verilog-declaration-re 2767 (concat "\\s-*" verilog-declaration-re
2768 "\\s-*\\(\\(" verilog-optional-signed-range-re "\\)\\|\\(" verilog-delay-re "\\)" 2768 "\\s-*\\(\\(" verilog-optional-signed-range-re "\\)\\|\\(" verilog-delay-re "\\)"
@@ -3292,7 +3292,7 @@ See also `verilog-font-lock-extra-types'.")
3292 'font-lock-preprocessor-face 3292 'font-lock-preprocessor-face
3293 'font-lock-type-face)) 3293 'font-lock-type-face))
3294 ;; Fontify delays/numbers 3294 ;; Fontify delays/numbers
3295 '("\\(@\\)\\|\\([ \t\n\f\r]#\\s-*\\(\\([0-9_.]+\\('s?[hdxbo][0-9a-fA-F_xz]*\\)?\\)\\|\\(([^()]+)\\|\\sw+\\)\\)\\)" 3295 '("\\(@\\)\\|\\([ \t\n\f\r]#\\s-*\\(\\([0-9_.]+\\('s?[hdxbo][[:xdigit:]_xz]*\\)?\\)\\|\\(([^()]+)\\|\\sw+\\)\\)\\)"
3296 0 font-lock-type-face append) 3296 0 font-lock-type-face append)
3297 ;; Fontify property/sequence cycle delays - these start with '##' 3297 ;; Fontify property/sequence cycle delays - these start with '##'
3298 '("\\(##\\(\\sw+\\|\\[[^]]+\\]\\)\\)" 3298 '("\\(##\\(\\sw+\\|\\[[^]]+\\]\\)\\)"
@@ -9182,7 +9182,7 @@ TEMP-NEXT is true to ignore next token, fake from inside case statement."
9182 (setq end-else-check t)) 9182 (setq end-else-check t))
9183 (forward-char 1)) 9183 (forward-char 1))
9184 ((equal keywd "'") 9184 ((equal keywd "'")
9185 (cond ((looking-at "'[sS]?[hdxboHDXBO]?[ \t]*[0-9a-fA-F_xzXZ?]+") 9185 (cond ((looking-at "'[sS]?[hdxboHDXBO]?[ \t]*[[:xdigit:]_xzXZ?]+")
9186 (goto-char (match-end 0))) 9186 (goto-char (match-end 0)))
9187 ((looking-at "'{") 9187 ((looking-at "'{")
9188 (forward-char 2) 9188 (forward-char 2)
@@ -9872,7 +9872,7 @@ Allows version control to check out the file if need be."
9872 "Return true if SYMBOL is number-like." 9872 "Return true if SYMBOL is number-like."
9873 (or (string-match "^[0-9 \t:]+$" symbol) 9873 (or (string-match "^[0-9 \t:]+$" symbol)
9874 (string-match "^[---]*[0-9]+$" symbol) 9874 (string-match "^[---]*[0-9]+$" symbol)
9875 (string-match "^[0-9 \t]+'s?[hdxbo][0-9a-fA-F_xz? \t]*$" symbol))) 9875 (string-match "^[0-9 \t]+'s?[hdxbo][[:xdigit:]_xz? \t]*$" symbol)))
9876 9876
9877(defun verilog-symbol-detick (symbol wing-it) 9877(defun verilog-symbol-detick (symbol wing-it)
9878 "Return an expanded SYMBOL name without any defines. 9878 "Return an expanded SYMBOL name without any defines.
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 5d5d787945d..b0653bce81c 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -873,7 +873,7 @@ cannot be completed sensibly: `custom-ident',
873 (css--uri-re (1 "|") (2 "|")))) 873 (css--uri-re (1 "|") (2 "|"))))
874 874
875(defconst css-escapes-re 875(defconst css-escapes-re
876 "\\\\\\(?:[^\000-\037\177]\\|[0-9a-fA-F]+[ \n\t\r\f]?\\)") 876 "\\\\\\(?:[^\000-\037\177]\\|[[:xdigit:]]+[ \n\t\r\f]?\\)")
877(defconst css-nmchar-re (concat "\\(?:[-[:alnum:]]\\|" css-escapes-re "\\)")) 877(defconst css-nmchar-re (concat "\\(?:[-[:alnum:]]\\|" css-escapes-re "\\)"))
878(defconst css-nmstart-re (concat "\\(?:[[:alpha:]]\\|" css-escapes-re "\\)")) 878(defconst css-nmstart-re (concat "\\(?:[[:alpha:]]\\|" css-escapes-re "\\)"))
879(defconst css-ident-re ;; (concat css-nmstart-re css-nmchar-re "*") 879(defconst css-ident-re ;; (concat css-nmstart-re css-nmchar-re "*")
@@ -1079,10 +1079,10 @@ This recognizes CSS-color-4 extensions."
1079 (regexp-opt (mapcar #'car css--color-map) 'symbols) 1079 (regexp-opt (mapcar #'car css--color-map) 'symbols)
1080 "\\|" 1080 "\\|"
1081 ;; Short hex. css-color-4 adds alpha. 1081 ;; Short hex. css-color-4 adds alpha.
1082 "\\(#[0-9a-fA-F]\\{3,4\\}\\b\\)" 1082 "\\(#[[:xdigit:]]\\{3,4\\}\\b\\)"
1083 "\\|" 1083 "\\|"
1084 ;; Long hex. css-color-4 adds alpha. 1084 ;; Long hex. css-color-4 adds alpha.
1085 "\\(#\\(?:[0-9a-fA-F][0-9a-fA-F]\\)\\{3,4\\}\\b\\)" 1085 "\\(#\\(?:[[:xdigit:]][[:xdigit:]]\\)\\{3,4\\}\\b\\)"
1086 "\\|" 1086 "\\|"
1087 ;; RGB. 1087 ;; RGB.
1088 "\\(\\_<rgba?(\\)" 1088 "\\(\\_<rgba?(\\)"
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index aa00024a6d9..d8210037c6d 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -1302,7 +1302,7 @@ With prefix argument UNQUOTEP, unquote the region. All numeric entities,
1302 (if unquotep 1302 (if unquotep
1303 ;; FIXME: We should unquote other named character references as well. 1303 ;; FIXME: We should unquote other named character references as well.
1304 (while (re-search-forward 1304 (while (re-search-forward
1305 "\\(&\\(amp\\|quot\\|lt\\|gt\\|#\\([0-9]+\\|[xX][0-9a-fA-F]+\\)\\)\\)\\([][<>&;\n\t \"%!'(),/=?]\\|$\\)" 1305 "\\(&\\(amp\\|quot\\|lt\\|gt\\|#\\([0-9]+\\|[xX][[:xdigit:]]+\\)\\)\\)\\([][<>&;\n\t \"%!'(),/=?]\\|$\\)"
1306 nil t) 1306 nil t)
1307 (replace-match 1307 (replace-match
1308 (string 1308 (string
diff --git a/lisp/version.el b/lisp/version.el
index d13d8c31e80..b9e2e50d1f7 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -120,7 +120,7 @@ or if we could not determine the revision.")
120 (with-demoted-errors "Error running git rev-parse: %S" 120 (with-demoted-errors "Error running git rev-parse: %S"
121 (call-process "git" nil '(t nil) nil "rev-parse" "HEAD"))) 121 (call-process "git" nil '(t nil) nil "rev-parse" "HEAD")))
122 (progn (goto-char (point-min)) 122 (progn (goto-char (point-min))
123 (looking-at "[0-9a-fA-F]\\{40\\}")) 123 (looking-at "[[:xdigit:]]\\{40\\}"))
124 (match-string 0))))) 124 (match-string 0)))))
125 125
126(defun emacs-repository-get-version (&optional dir external) 126(defun emacs-repository-get-version (&optional dir external)
diff --git a/lisp/xml.el b/lisp/xml.el
index 09ec72f792f..833eb8aced2 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -194,13 +194,13 @@ See also `xml-get-attribute-or-nil'."
194;; [8] Nmtokens ::= Nmtoken (#x20 Nmtoken)* 194;; [8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*
195(defconst xml-nmtokens-re (concat xml-nmtoken-re "\\(?: " xml-name-re "\\)*")) 195(defconst xml-nmtokens-re (concat xml-nmtoken-re "\\(?: " xml-name-re "\\)*"))
196 196
197;; [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' 197;; [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [[:xdigit:]]+ ';'
198(defconst xml-char-ref-re "\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)") 198(defconst xml-char-ref-re "\\(?:&#[0-9]+;\\|&#x[[:xdigit:]]+;\\)")
199 199
200;; [68] EntityRef ::= '&' Name ';' 200;; [68] EntityRef ::= '&' Name ';'
201(defconst xml-entity-ref (concat "&" xml-name-re ";")) 201(defconst xml-entity-ref (concat "&" xml-name-re ";"))
202 202
203(defconst xml-entity-or-char-ref-re (concat "&\\(?:#\\(x\\)?\\([0-9a-fA-F]+\\)\\|\\(" 203(defconst xml-entity-or-char-ref-re (concat "&\\(?:#\\(x\\)?\\([[:xdigit:]]+\\)\\|\\("
204 xml-name-re "\\)\\);")) 204 xml-name-re "\\)\\);"))
205 205
206;; [69] PEReference ::= '%' Name ';' 206;; [69] PEReference ::= '%' Name ';'
@@ -889,7 +889,7 @@ This follows the rule [28] in the XML specifications."
889The replacement text is obtained by replacing character 889The replacement text is obtained by replacing character
890references and parameter-entity references." 890references and parameter-entity references."
891 (let ((ref-re (eval-when-compile 891 (let ((ref-re (eval-when-compile
892 (concat "\\(?:&#\\([0-9]+\\)\\|&#x\\([0-9a-fA-F]+\\)\\|%\\(" 892 (concat "\\(?:&#\\([0-9]+\\)\\|&#x\\([[:xdigit:]]+\\)\\|%\\("
893 xml-name-re "\\)\\);"))) 893 xml-name-re "\\)\\);")))
894 children) 894 children)
895 (while (string-match ref-re string) 895 (while (string-match ref-re string)
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index 5349de055ed..96a604f9824 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -60,7 +60,7 @@
60 (should (eq 0 60 (should (eq 0
61 (string-match 61 (string-match
62 (concat "#<module function " 62 (concat "#<module function "
63 "\\(at \\(0x\\)?[0-9a-fA-F]+\\( from .*\\)?" 63 "\\(at \\(0x\\)?[[:xdigit:]]+\\( from .*\\)?"
64 "\\|Fmod_test_sum from .*\\)>") 64 "\\|Fmod_test_sum from .*\\)>")
65 (prin1-to-string (nth 1 descr))))) 65 (prin1-to-string (nth 1 descr)))))
66 (should (= (nth 2 descr) 3))) 66 (should (= (nth 2 descr) 3)))