[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b4336b2832: Make textsec-suspicious-nonspacing-p work on marks
From: |
Lars Ingebrigtsen |
Subject: |
master b4336b2832: Make textsec-suspicious-nonspacing-p work on marks |
Date: |
Wed, 19 Jan 2022 08:42:53 -0500 (EST) |
branch: master
commit b4336b2832cad22603f14f114d97abd95bdccc8c
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make textsec-suspicious-nonspacing-p work on marks
* lisp/international/textsec.el (textsec-suspicious-nonspacing-p):
We're only interested in nonspacing marks, not control characters
in this test.
---
lisp/international/textsec.el | 2 +-
test/lisp/international/textsec-tests.el | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/international/textsec.el b/lisp/international/textsec.el
index ebd67e4237..394da44e9a 100644
--- a/lisp/international/textsec.el
+++ b/lisp/international/textsec.el
@@ -310,7 +310,7 @@ consecutive nonspacing characters."
(lambda (char)
(let ((nonspacing
(memq (get-char-code-property char 'general-category)
- '(Cf Cc Mn))))
+ '(Mn Me))))
(when (and nonspacing
(equal char prev))
(throw 'found "Two identical consecutive nonspacing characters"))
diff --git a/test/lisp/international/textsec-tests.el
b/test/lisp/international/textsec-tests.el
index aeb8bc7283..817264ec5f 100644
--- a/test/lisp/international/textsec-tests.el
+++ b/test/lisp/international/textsec-tests.el
@@ -138,11 +138,11 @@
"Lars Ingebrigtsen\N{LEFT-TO-RIGHT MARK}"))
(should (textsec-name-suspicious-p
- "\N{LEFT-TO-RIGHT MARK}\N{LEFT-TO-RIGHT MARK}Lars Ingebrigtsen"))
+ "\N{COMBINING GRAVE ACCENT}\N{COMBINING GRAVE ACCENT}Lars
Ingebrigtsen"))
(should-not (textsec-name-suspicious-p
- "\N{LEFT-TO-RIGHT MARK}\N{RIGHT-TO-LEFT MARK}Lars
Ingebrigtsen"))
+ "\N{COMBINING GRAVE ACCENT}\N{COMBINING ENCLOSING CIRCLE}Lars
Ingebrigtsen"))
(should (textsec-name-suspicious-p
- "\N{LEFT-TO-RIGHT MARK}\N{RIGHT-TO-LEFT MARK}\N{LEFT-TO-RIGHT
MARK}\N{RIGHT-TO-LEFT MARK}\N{LEFT-TO-RIGHT MARK}Lars Ingebrigtsen")))
+ "\N{COMBINING GRAVE ACCENT}\N{COMBINING ENCLOSING
CIRCLE}\N{COMBINING GRAVE ACCENT}\N{COMBINING ENCLOSING CIRCLE}\N{COMBINING
GRAVE ACCENT}Lars Ingebrigtsen")))
(ert-deftest test-suspicious-email ()
(should-not
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master b4336b2832: Make textsec-suspicious-nonspacing-p work on marks,
Lars Ingebrigtsen <=