[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flx 8849b39816 066/182: Make flx-capital-p behave correctl
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flx 8849b39816 066/182: Make flx-capital-p behave correctly for non-latin words |
Date: |
Tue, 13 Dec 2022 03:59:30 -0500 (EST) |
branch: elpa/flx
commit 8849b398161f94b94dfc48d9664f66f49555a2cf
Author: Bozhidar Batsov <bozhidar@tradeo.com>
Commit: Bozhidar Batsov <bozhidar@tradeo.com>
Make flx-capital-p behave correctly for non-latin words
It's entirely possible for one to have non-latin words in his ido
candidates. This commit improves `flx-capital-p` by making it recognize
non-latin letters.
---
flx.el | 4 ++--
tests/flx-test.el | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/flx.el b/flx.el
index a81bbec60e..301e4a2bb4 100644
--- a/flx.el
+++ b/flx.el
@@ -78,8 +78,8 @@
(defsubst flx-capital-p (char)
"Check if CHAR is an uppercase character."
(and char
- (and (<= char ?Z)
- (<= ?A char))))
+ (flx-word-p char)
+ (= char (upcase char))))
(defsubst flx-boundary-p (last-char char)
"Check is LAST-CHAR is the end of a word and CHAR the start of the next.
diff --git a/tests/flx-test.el b/tests/flx-test.el
index 4081a56870..880d6b6e9c 100644
--- a/tests/flx-test.el
+++ b/tests/flx-test.el
@@ -60,8 +60,10 @@
(ert-deftest flx-capital-p ()
(should (flx-capital-p ?A))
(should (flx-capital-p ?Z))
+ (should (flx-capital-p ?Д))
(should-not (flx-capital-p ?_))
- (should-not (flx-capital-p ?a)))
+ (should-not (flx-capital-p ?a))
+ (should-not (flx-capital-p ?д)))
(ert-deftest flx-word-p ()
(should (flx-word-p ?a))
- [nongnu] elpa/flx 331ef6f109 001/182: first commit, (continued)
- [nongnu] elpa/flx 331ef6f109 001/182: first commit, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 2348893f90 012/182: flx-ido always use filename cache, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 387d1ee048 008/182: update ido implementation with ido demo, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 47ef1bf377 006/182: update license, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 9fec96087b 010/182: fix sort modifying list by side-effect bug, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx d295ba6a2f 007/182: add test list, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx b1702e2aa1 054/182: Add colon to non-word characters., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 5a23bc7da3 003/182: update tests, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 64b8e0f934 027/182: work around ido bug 10994, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 8605b4b421 026/182: don't do caching when reading file names, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 8849b39816 066/182: Make flx-capital-p behave correctly for non-latin words,
ELPA Syncer <=
- [nongnu] elpa/flx ad87db4348 068/182: Make flx-ido depend on flx on package level, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 225fae97c9 070/182: Mention Marmalade in the README, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 43f78d4815 090/182: Touch-up commentary., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx dd428a8cc6 095/182: Add some debug statements., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3054a8038d 112/182: Fix typo in README.md, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f0c3157268 114/182: Increase default flx-ido-threshold to 6000, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f5fda2897f 125/182: enable lexical-binding, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3cd3bf7687 129/182: add perf test-case, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 2b31df9ed0 140/182: Make dynamic programming test even more "difficult", ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx cd557fcb00 051/182: fix C-SPC, ELPA Syncer, 2022/12/13