diff options
| author | Lars Ingebrigtsen | 2022-01-19 18:50:40 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-01-19 18:50:40 +0100 |
| commit | 50ddfb2428496d7f5b8f37d3345fb2fdb88bb6ea (patch) | |
| tree | f9b94bb491190214a380daf41cfdebecc4980c3a | |
| parent | b28f420737b7d2b4f2f9dfe57922f073adc037c9 (diff) | |
| download | emacs-50ddfb2428496d7f5b8f37d3345fb2fdb88bb6ea.tar.gz emacs-50ddfb2428496d7f5b8f37d3345fb2fdb88bb6ea.zip | |
Make textsec-mixed-numbers-p actually work
* lisp/international/textsec.el (textsec-mixed-numbers-p): Fix the
test.
| -rw-r--r-- | lisp/international/textsec.el | 3 | ||||
| -rw-r--r-- | test/lisp/international/textsec-tests.el | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lisp/international/textsec.el b/lisp/international/textsec.el index 62885ae15da..bf90afb7c00 100644 --- a/lisp/international/textsec.el +++ b/lisp/international/textsec.el | |||
| @@ -169,7 +169,8 @@ Levels are (in decreasing order of restrictiveness) `ascii-only', | |||
| 169 | (seq-uniq | 169 | (seq-uniq |
| 170 | (mapcar | 170 | (mapcar |
| 171 | (lambda (char) | 171 | (lambda (char) |
| 172 | (get-char-code-property char 'numeric-value)) | 172 | ;; Compare zeros in the respective decimal systems. |
| 173 | (- char (get-char-code-property char 'numeric-value))) | ||
| 173 | (seq-filter (lambda (char) | 174 | (seq-filter (lambda (char) |
| 174 | ;; We're selecting the characters that | 175 | ;; We're selecting the characters that |
| 175 | ;; have a numeric property. | 176 | ;; have a numeric property. |
diff --git a/test/lisp/international/textsec-tests.el b/test/lisp/international/textsec-tests.el index 416490aa085..acd77971501 100644 --- a/test/lisp/international/textsec-tests.el +++ b/test/lisp/international/textsec-tests.el | |||
| @@ -84,6 +84,7 @@ | |||
| 84 | (ert-deftest test-mixed-numbers () | 84 | (ert-deftest test-mixed-numbers () |
| 85 | (should-not (textsec-mixed-numbers-p "foo")) | 85 | (should-not (textsec-mixed-numbers-p "foo")) |
| 86 | (should-not (textsec-mixed-numbers-p "8foo8")) | 86 | (should-not (textsec-mixed-numbers-p "8foo8")) |
| 87 | (should-not (textsec-mixed-numbers-p "foo20@foo.org")) | ||
| 87 | (should (textsec-mixed-numbers-p "8foo৪"))) | 88 | (should (textsec-mixed-numbers-p "8foo৪"))) |
| 88 | 89 | ||
| 89 | (ert-deftest test-resolved () | 90 | (ert-deftest test-resolved () |