diff options
Diffstat (limited to 'lisp/calc')
-rw-r--r-- | lisp/calc/calc-aent.el | 2 | ||||
-rw-r--r-- | lisp/calc/calc-ext.el | 4 | ||||
-rw-r--r-- | lisp/calc/calc-lang.el | 2 |
3 files changed, 4 insertions, 4 deletions
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.") math-exp-str (1- math-exp-pos)) (1- math-exp-pos)))))) (or (and (memq calc-language calc-lang-c-type-hex) - (eq (string-match "0[xX][0-9a-fA-F]+" math-exp-str + (eq (string-match "0[xX][[:xdigit:]]+" math-exp-str math-exp-pos) math-exp-pos)) (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." ;; C language hexadecimal notation ((and (eq calc-language 'c) - (string-match "^0[xX]\\([0-9a-fA-F]+\\)$" s)) + (string-match "^0[xX]\\([[:xdigit:]]+\\)$" s)) (let ((digs (math-match-substring s 1))) (math-read-radix digs 16))) ;; Pascal language hexadecimal notation ((and (eq calc-language 'pascal) - (string-match "^\\$\\([0-9a-fA-F]+\\)$" s)) + (string-match "^\\$\\([[:xdigit:]]+\\)$" s)) (let ((digs (math-match-substring s 1))) (math-read-radix digs 16))) 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 @@ (put 'pascal 'math-lang-read-symbol '((?\$ (eq (string-match - "\\(\\$[0-9a-fA-F]+\\)\\($\\|[^0-9a-zA-Zα-ωΑ-Ω]\\)" + "\\(\\$[[:xdigit:]]+\\)\\($\\|[^0-9a-zA-Zα-ωΑ-Ω]\\)" math-exp-str math-exp-pos) math-exp-pos) (setq math-exp-token 'number |