aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorKonstantin Kharlamov2019-06-13 03:18:43 +0300
committerEli Zaretskii2019-07-06 10:54:25 +0300
commitdfc322d77fd1ce3aa4d852e0ff07bb36944f6432 (patch)
tree8c17686c0e2ae4beaab2f4568cd3654f0fb756cc /lisp/progmodes
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)
Diffstat (limited to 'lisp/progmodes')
-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
10 files changed, 36 insertions, 36 deletions
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.