emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 8f4faf7: * lisp/char-fold.el: Rename char-fold-make


From: Juri Linkov
Subject: [Emacs-diffs] master 8f4faf7: * lisp/char-fold.el: Rename char-fold-make-table to char-fold--make-table.
Date: Sun, 28 Jul 2019 18:55:43 -0400 (EDT)

branch: master
commit 8f4faf7aa1a1b92dbd4d1512592da44e47777e4b
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * lisp/char-fold.el: Rename char-fold-make-table to char-fold--make-table.
---
 lisp/char-fold.el            |  6 ++--
 test/lisp/char-fold-tests.el | 80 +++++++++++++++++++++++---------------------
 2 files changed, 44 insertions(+), 42 deletions(-)

diff --git a/lisp/char-fold.el b/lisp/char-fold.el
index b05d374..d8d2ebc 100644
--- a/lisp/char-fold.el
+++ b/lisp/char-fold.el
@@ -44,7 +44,7 @@
 
 
 (eval-and-compile
-  (defun char-fold-make-table ()
+  (defun char-fold--make-table ()
     (let* ((equiv (make-char-table 'char-fold-table))
            (equiv-multi (make-char-table 'char-fold-table))
            (table (unicode-property-table-internal 'decomposition)))
@@ -204,7 +204,7 @@
 
 (defconst char-fold-table
   (eval-when-compile
-    (char-fold-make-table))
+    (char-fold--make-table))
   "Used for folding characters of the same group during search.
 This is a char-table with the `char-fold-table' subtype.
 
@@ -237,7 +237,7 @@ Exceptionally for the space character (32), ALIST is 
ignored.")
                    (or (bound-and-true-p char-fold-symmetric)
                        char-fold--default-symmetric))))
     (unless (equal char-fold--previous new)
-      (setq char-fold-table (char-fold-make-table)
+      (setq char-fold-table (char-fold--make-table)
             char-fold--previous new))))
 
 (defcustom char-fold-include char-fold--default-include
diff --git a/test/lisp/char-fold-tests.el b/test/lisp/char-fold-tests.el
index 0efbdcf..241f7bf 100644
--- a/test/lisp/char-fold-tests.el
+++ b/test/lisp/char-fold-tests.el
@@ -171,45 +171,47 @@
 (ert-deftest char-fold--test-with-customization ()
   :tags '(:expensive-test)
   ;; FIXME: move some language-specific settings to defaults
-  (let* ((char-fold-include
-          (append char-fold-include
-                  '(
-                    (?o "ø") ;; da no nb nn
-                    (?l "ł") ;; pl
-                    (?æ "ae")
-                    (?→ "->")
-                    (?⇒ "=>")
-                    )))
-         (char-fold-exclude
-          (append char-fold-exclude
-                  '(
-                    (?a "å") ;; da no nb nn sv
-                    (?a "ä") ;; et fi sv
-                    (?o "ö") ;; et fi sv
-                    (?n "ñ") ;; es
-                    )))
-         (char-fold-symmetric t)
-         (char-fold-table (char-fold-make-table))
-         (matches
-          '(
-            ("e" "ℯ" "ḗ" "ë" "ë")
-            ("е" "ё" "ё")
-            ("ι" "ί" "ί" "ΐ")
-            ("ß" "ss")
-            ("o" "ø")
-            ("l" "ł")
-            ("æ" "ae")
-            ("→" "->")
-            ("⇒" "=>")
-            ))
-         (no-matches
-          '(
-            ("a" "å")
-            ("a" "ä")
-            ("o" "ö")
-            ("n" "ñ")
-            ("и" "й")
-            )))
+  (let ((char-fold-include
+         (append char-fold-include
+                 '(
+                   (?o "ø")  ;; da no nb nn
+                   (?l "ł")  ;; pl
+                   (?æ "ae")
+                   (?→ "->")
+                   (?⇒ "=>")
+                   )))
+        (char-fold-exclude
+         (append char-fold-exclude
+                 '(
+                   (?a "å")  ;; da no nb nn sv
+                   (?a "ä")  ;; et fi sv
+                   (?o "ö")  ;; et fi sv
+                   (?n "ñ")  ;; es
+                   )))
+        (char-fold-symmetric t)
+        (matches
+         '(
+           ("e" "ℯ" "ḗ" "ë" "ë")
+           ("е" "ё" "ё")
+           ("ι" "ί" "ί" "ΐ")
+           ("ß" "ss")
+           ("o" "ø")
+           ("l" "ł")
+           ("æ" "ae")
+           ("→" "->")
+           ("⇒" "=>")
+           ))
+        (no-matches
+         '(
+           ("a" "å")
+           ("a" "ä")
+           ("o" "ö")
+           ("n" "ñ")
+           ("и" "й")
+           ))
+        ;; Don't override global value by char-fold-update-table below
+        char-fold-table)
+    (char-fold-update-table)
     (dolist (strings matches)
       (dolist (permutation (char-fold--permutation strings))
         (apply 'char-fold--test-match-exactly permutation)))



reply via email to

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