diff options
author | Juri Linkov <juri@linkov.net> | 2019-07-29 01:45:36 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2019-07-29 01:45:36 +0300 |
commit | be16c204d6fba6c7cf2e2cb9fda5d7f6637f12f7 (patch) | |
tree | d23726f18cb1470be6cb8d5f86b16bbcfa990050 /lisp/char-fold.el | |
parent | d69e1d7056155d7c14eac31b9303af5ac1549e35 (diff) | |
download | emacs-be16c204d6fba6c7cf2e2cb9fda5d7f6637f12f7.tar.gz |
Move some uncontroversial char-folding pairs from test data to default values
* lisp/char-fold.el (char-fold--default-include)
(char-fold--default-exclude): Add some default values.
* test/lisp/char-fold-tests.el (char-fold--test-without-customization)
(char-fold--test-with-customization): Move some test data to
default values. Add more data for tests to pass. (Bug#35689)
Diffstat (limited to 'lisp/char-fold.el')
-rw-r--r-- | lisp/char-fold.el | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lisp/char-fold.el b/lisp/char-fold.el index f379229e6c4..b05d37455b9 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -27,12 +27,20 @@ (defconst char-fold--default-include '((?\" """ "“" "”" "”" "„" "⹂" "〞" "‟" "‟" "❞" "❝" "❠" "“" "„" "〝" "〟" "🙷" "🙶" "🙸" "«" "»") (?' "❟" "❛" "❜" "‘" "’" "‚" "‛" "‚" "" "❮" "❯" "‹" "›") - (?` "❛" "‘" "‛" "" "❮" "‹"))) - (defconst char-fold--default-exclude nil) + (?` "❛" "‘" "‛" "" "❮" "‹") + (?ß "ss") ;; de + (?ι "ΐ") ;; el for (?ΐ "ΐ") decomposition + (?υ "ΰ") ;; el for (?ΰ "ΰ") decomposition + )) + (defconst char-fold--default-exclude + '( + (?и "й") ;; ru + )) (defconst char-fold--default-symmetric nil) - (defconst char-fold--previous (list char-fold--default-include - char-fold--default-exclude - char-fold--default-symmetric))) + (defvar char-fold--previous + (list char-fold--default-include + char-fold--default-exclude + char-fold--default-symmetric))) (eval-and-compile @@ -221,12 +229,13 @@ Exceptionally for the space character (32), ALIST is ignored.") (defun char-fold-update-table () + "Update char-fold-table only when one of the options changes its value." (let ((new (list (or (bound-and-true-p char-fold-include) char-fold--default-include) (or (bound-and-true-p char-fold-exclude) char-fold--default-exclude) (or (bound-and-true-p char-fold-symmetric) - char-fold--default-symmetric)))) + char-fold--default-symmetric)))) (unless (equal char-fold--previous new) (setq char-fold-table (char-fold-make-table) char-fold--previous new)))) |