aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-07-29 01:55:34 +0300
committerJuri Linkov2019-07-29 01:55:34 +0300
commit8f4faf7aa1a1b92dbd4d1512592da44e47777e4b (patch)
tree771a6fc7ac3a2997070244a9c39f02e150121770
parentbe16c204d6fba6c7cf2e2cb9fda5d7f6637f12f7 (diff)
downloademacs-8f4faf7aa1a1b92dbd4d1512592da44e47777e4b.tar.gz
emacs-8f4faf7aa1a1b92dbd4d1512592da44e47777e4b.zip
* lisp/char-fold.el: Rename char-fold-make-table to char-fold--make-table.
-rw-r--r--lisp/char-fold.el6
-rw-r--r--test/lisp/char-fold-tests.el80
2 files changed, 44 insertions, 42 deletions
diff --git a/lisp/char-fold.el b/lisp/char-fold.el
index b05d37455b9..d8d2ebc72ba 100644
--- a/lisp/char-fold.el
+++ b/lisp/char-fold.el
@@ -44,7 +44,7 @@
44 44
45 45
46(eval-and-compile 46(eval-and-compile
47 (defun char-fold-make-table () 47 (defun char-fold--make-table ()
48 (let* ((equiv (make-char-table 'char-fold-table)) 48 (let* ((equiv (make-char-table 'char-fold-table))
49 (equiv-multi (make-char-table 'char-fold-table)) 49 (equiv-multi (make-char-table 'char-fold-table))
50 (table (unicode-property-table-internal 'decomposition))) 50 (table (unicode-property-table-internal 'decomposition)))
@@ -204,7 +204,7 @@
204 204
205(defconst char-fold-table 205(defconst char-fold-table
206 (eval-when-compile 206 (eval-when-compile
207 (char-fold-make-table)) 207 (char-fold--make-table))
208 "Used for folding characters of the same group during search. 208 "Used for folding characters of the same group during search.
209This is a char-table with the `char-fold-table' subtype. 209This is a char-table with the `char-fold-table' subtype.
210 210
@@ -237,7 +237,7 @@ Exceptionally for the space character (32), ALIST is ignored.")
237 (or (bound-and-true-p char-fold-symmetric) 237 (or (bound-and-true-p char-fold-symmetric)
238 char-fold--default-symmetric)))) 238 char-fold--default-symmetric))))
239 (unless (equal char-fold--previous new) 239 (unless (equal char-fold--previous new)
240 (setq char-fold-table (char-fold-make-table) 240 (setq char-fold-table (char-fold--make-table)
241 char-fold--previous new)))) 241 char-fold--previous new))))
242 242
243(defcustom char-fold-include char-fold--default-include 243(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 0efbdcf988c..241f7bf16c8 100644
--- a/test/lisp/char-fold-tests.el
+++ b/test/lisp/char-fold-tests.el
@@ -171,45 +171,47 @@
171(ert-deftest char-fold--test-with-customization () 171(ert-deftest char-fold--test-with-customization ()
172 :tags '(:expensive-test) 172 :tags '(:expensive-test)
173 ;; FIXME: move some language-specific settings to defaults 173 ;; FIXME: move some language-specific settings to defaults
174 (let* ((char-fold-include 174 (let ((char-fold-include
175 (append char-fold-include 175 (append char-fold-include
176 '( 176 '(
177 (?o "ø") ;; da no nb nn 177 (?o "ø") ;; da no nb nn
178 (?l "ł") ;; pl 178 (?l "ł") ;; pl
179 (?æ "ae") 179 (?æ "ae")
180 (?→ "->") 180 (?→ "->")
181 (?⇒ "=>") 181 (?⇒ "=>")
182 ))) 182 )))
183 (char-fold-exclude 183 (char-fold-exclude
184 (append char-fold-exclude 184 (append char-fold-exclude
185 '( 185 '(
186 (?a "å") ;; da no nb nn sv 186 (?a "å") ;; da no nb nn sv
187 (?a "ä") ;; et fi sv 187 (?a "ä") ;; et fi sv
188 (?o "ö") ;; et fi sv 188 (?o "ö") ;; et fi sv
189 (?n "ñ") ;; es 189 (?n "ñ") ;; es
190 ))) 190 )))
191 (char-fold-symmetric t) 191 (char-fold-symmetric t)
192 (char-fold-table (char-fold-make-table)) 192 (matches
193 (matches 193 '(
194 '( 194 ("e" "ℯ" "ḗ" "ë" "ë")
195 ("e" "ℯ" "ḗ" "ë" "ë") 195 ("е" "ё" "ё")
196 ("е" "ё" "ё") 196 ("ι" "ί" "ί" "ΐ")
197 ("ι" "ί" "ί" "ΐ") 197 ("ß" "ss")
198 ("ß" "ss") 198 ("o" "ø")
199 ("o" "ø") 199 ("l" "ł")
200 ("l" "ł") 200 ("æ" "ae")
201 ("æ" "ae") 201 ("→" "->")
202 ("→" "->") 202 ("⇒" "=>")
203 ("⇒" "=>") 203 ))
204 )) 204 (no-matches
205 (no-matches 205 '(
206 '( 206 ("a" "å")
207 ("a" "å") 207 ("a" "ä")
208 ("a" "ä") 208 ("o" "ö")
209 ("o" "ö") 209 ("n" "ñ")
210 ("n" "ñ") 210 ("и" "й")
211 ("и" "й") 211 ))
212 ))) 212 ;; Don't override global value by char-fold-update-table below
213 char-fold-table)
214 (char-fold-update-table)
213 (dolist (strings matches) 215 (dolist (strings matches)
214 (dolist (permutation (char-fold--permutation strings)) 216 (dolist (permutation (char-fold--permutation strings))
215 (apply 'char-fold--test-match-exactly permutation))) 217 (apply 'char-fold--test-match-exactly permutation)))