emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/markchars 957a346 7/9: * packages/markchars/markchars.e


From: Stefan Monnier
Subject: [elpa] externals/markchars 957a346 7/9: * packages/markchars/markchars.el: Strip combining characters (bug#36923)
Date: Sat, 28 Nov 2020 22:45:44 -0500 (EST)

branch: externals/markchars
commit 957a34685eef9d720522001b46daf251bcad04c9
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * packages/markchars/markchars.el: Strip combining characters (bug#36923)
---
 markchars.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/markchars.el b/markchars.el
index 152d728..7d7fe29 100644
--- a/markchars.el
+++ b/markchars.el
@@ -157,6 +157,12 @@ By default it matches nonascii-chars."
 (defun markchars--render-confusables (beg end)
   "Assign markchars confusable properties between BEG and END."
   (let* ((text (buffer-substring-no-properties beg end))
+         ;; Strip combining characters (bug#36923)
+         (text (mapconcat (lambda (c)
+                            (when (zerop (get-char-code-property
+                                          c 'canonical-combining-class))
+                              (string c)))
+                          (string-to-list text) ""))
          (scripts (mapcar
                    (lambda (c) (aref char-script-table c))
                    (string-to-list text)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]