Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8f4faf7a
Commit
8f4faf7a
authored
Jul 29, 2019
by
Juri Linkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lisp/char-fold.el: Rename char-fold-make-table to char-fold--make-table.
parent
be16c204
Pipeline
#2639
passed with stage
in 58 minutes and 35 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
42 deletions
+44
-42
lisp/char-fold.el
lisp/char-fold.el
+3
-3
test/lisp/char-fold-tests.el
test/lisp/char-fold-tests.el
+41
-39
No files found.
lisp/char-fold.el
View file @
8f4faf7a
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
(
eval-and-compile
(
eval-and-compile
(
defun
char-fold-make-table
()
(
defun
char-fold-
-
make-table
()
(
let*
((
equiv
(
make-char-table
'char-fold-table
))
(
let*
((
equiv
(
make-char-table
'char-fold-table
))
(
equiv-multi
(
make-char-table
'char-fold-table
))
(
equiv-multi
(
make-char-table
'char-fold-table
))
(
table
(
unicode-property-table-internal
'decomposition
)))
(
table
(
unicode-property-table-internal
'decomposition
)))
...
@@ -204,7 +204,7 @@
...
@@ -204,7 +204,7 @@
(
defconst
char-fold-table
(
defconst
char-fold-table
(
eval-when-compile
(
eval-when-compile
(
char-fold-make-table
))
(
char-fold-
-
make-table
))
"Used for folding characters of the same group during search.
"Used for folding characters of the same group during search.
This is a char-table with the `char-fold-table' subtype.
This is a char-table with the `char-fold-table' subtype.
...
@@ -237,7 +237,7 @@ Exceptionally for the space character (32), ALIST is ignored.")
...
@@ -237,7 +237,7 @@ Exceptionally for the space character (32), ALIST is ignored.")
(
or
(
bound-and-true-p
char-fold-symmetric
)
(
or
(
bound-and-true-p
char-fold-symmetric
)
char-fold--default-symmetric
))))
char-fold--default-symmetric
))))
(
unless
(
equal
char-fold--previous
new
)
(
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
))))
char-fold--previous
new
))))
(
defcustom
char-fold-include
char-fold--default-include
(
defcustom
char-fold-include
char-fold--default-include
...
...
test/lisp/char-fold-tests.el
View file @
8f4faf7a
...
@@ -171,45 +171,47 @@
...
@@ -171,45 +171,47 @@
(
ert-deftest
char-fold--test-with-customization
()
(
ert-deftest
char-fold--test-with-customization
()
:tags
'
(
:expensive-test
)
:tags
'
(
:expensive-test
)
;; FIXME: move some language-specific settings to defaults
;; FIXME: move some language-specific settings to defaults
(
let*
((
char-fold-include
(
let
((
char-fold-include
(
append
char-fold-include
(
append
char-fold-include
'
(
'
(
(
?o
"ø"
)
;; da no nb nn
(
?o
"ø"
)
;; da no nb nn
(
?l
"ł"
)
;; pl
(
?l
"ł"
)
;; pl
(
?
æ
"ae"
)
(
?
æ
"ae"
)
(
?
→
"->"
)
(
?
→
"->"
)
(
?
⇒
"=>"
)
(
?
⇒
"=>"
)
)))
)))
(
char-fold-exclude
(
char-fold-exclude
(
append
char-fold-exclude
(
append
char-fold-exclude
'
(
'
(
(
?a
"å"
)
;; da no nb nn sv
(
?a
"å"
)
;; da no nb nn sv
(
?a
"ä"
)
;; et fi sv
(
?a
"ä"
)
;; et fi sv
(
?o
"ö"
)
;; et fi sv
(
?o
"ö"
)
;; et fi sv
(
?n
"ñ"
)
;; es
(
?n
"ñ"
)
;; es
)))
)))
(
char-fold-symmetric
t
)
(
char-fold-symmetric
t
)
(
char-fold-table
(
char-fold-make-table
))
(
matches
(
matches
'
(
'
(
(
"e"
"ℯ"
"ḗ"
"ë"
"ë"
)
(
"e"
"ℯ"
"ḗ"
"ë"
"ë"
)
(
"е"
"ё"
"ё"
)
(
"е"
"ё"
"ё"
)
(
"ι"
"ί"
"ί"
"ΐ"
)
(
"ι"
"ί"
"ί"
"ΐ"
)
(
"ß"
"ss"
)
(
"ß"
"ss"
)
(
"o"
"ø"
)
(
"o"
"ø"
)
(
"l"
"ł"
)
(
"l"
"ł"
)
(
"æ"
"ae"
)
(
"æ"
"ae"
)
(
"→"
"->"
)
(
"→"
"->"
)
(
"⇒"
"=>"
)
(
"⇒"
"=>"
)
))
))
(
no-matches
(
no-matches
'
(
'
(
(
"a"
"å"
)
(
"a"
"å"
)
(
"a"
"ä"
)
(
"a"
"ä"
)
(
"o"
"ö"
)
(
"o"
"ö"
)
(
"n"
"ñ"
)
(
"n"
"ñ"
)
(
"и"
"й"
)
(
"и"
"й"
)
))
)))
;; Don't override global value by char-fold-update-table below
char-fold-table
)
(
char-fold-update-table
)
(
dolist
(
strings
matches
)
(
dolist
(
strings
matches
)
(
dolist
(
permutation
(
char-fold--permutation
strings
))
(
dolist
(
permutation
(
char-fold--permutation
strings
))
(
apply
'char-fold--test-match-exactly
permutation
)))
(
apply
'char-fold--test-match-exactly
permutation
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment