[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless bc9e48216e 120/204: Add option for "smart cas
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless bc9e48216e 120/204: Add option for "smart case" matching |
Date: |
Tue, 11 Jan 2022 12:58:22 -0500 (EST) |
branch: externals/orderless
commit bc9e48216e6e3016ea2acb329435573c9c6b1a41
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Add option for "smart case" matching
---
orderless.el | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/orderless.el b/orderless.el
index 5df1f3ef6f..8f7cc404e8 100644
--- a/orderless.el
+++ b/orderless.el
@@ -207,6 +207,21 @@ consult this variable at all."
:type 'function
:group 'orderless)
+(defcustom orderless-smart-case t
+ "Whether to use smart case.
+If this variable is t, then case-sensitivity is decided as
+follows: if any component contains upper case letters, the
+matches are case sensitive; otherwise case-insensitive. This
+like the behavior of `isearch' when `search-upper-case' is
+non-nil.
+
+On the other hand, if this variable is nil, then case-sensitivity
+is determined by the values of `completion-ignore-case',
+`read-file-name-completion-ignore-case' and
+`read-buffer-completion-ignore-case', as usual for completion."
+ :type 'boolean
+ :group 'orderless)
+
;;; Matching styles
(defalias 'orderless-regexp #'identity
@@ -440,7 +455,12 @@ The predicate PRED is used to constrain the entries in
TABLE."
(pcase-let* ((`(,prefix . ,pattern)
(orderless--prefix+pattern string table pred))
(completion-regexp-list
- (funcall orderless-pattern-compiler pattern)))
+ (funcall orderless-pattern-compiler pattern))
+ (completion-ignore-case
+ (if orderless-smart-case
+ (cl-loop for regexp in completion-regexp-list
+ always (isearch-no-upper-case-p regexp t))
+ completion-ignore-case)))
(all-completions prefix table pred)))
(invalid-regexp nil)))
- [elpa] externals/orderless 582b3a9fa8 031/204: Make all `defface' syntax more efficient+readable, (continued)
- [elpa] externals/orderless 582b3a9fa8 031/204: Make all `defface' syntax more efficient+readable, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless c51037b8ef 024/204: Add custom variable for component separator regexp, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 9856eeed32 047/204: Mention prefixes style in overview, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless cacd856f9a 041/204: Leverage completion-regexp-list: simplify code, increase speed!, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 3005cf8ee9 077/204: Merge pull request #12 from noctuid/feature/strict-initialism, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless f8efbdae4d 087/204: Document style dispatches in the README, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless e16fc5ddb1 099/204: Ido has progressive completion too!, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless dc1a31b5fc 098/204: Merge remote-tracking branch 'github/master', ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 306fb267f5 100/204: Mark orderless-temporarily-change-separator obsolete (#15), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 09f4c74280 105/204: Update dispatchers documentation, add transient vars, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless bc9e48216e 120/204: Add option for "smart case" matching,
ELPA Syncer <=
- [elpa] externals/orderless 1f1e0380e2 122/204: Test for match before highlighting it, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 6b94b9abf8 124/204: Merge pull request #21 from wyuenho/patch-1, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 0826fd4eb4 130/204: Merge pull request #27 from vifon/master, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless fc420e3d07 134/204: Minor readme tweak, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless b600f88db0 144/204: Add orderless-define-completion-style macro, a new fix for #31, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 94d52640d4 145/204: Change docstring interface for orderless-define-completion-style, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless da876320b3 146/204: Remove all orderless-transient-* variables (fix #34), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless c023ee1cbe 150/204: Add option to skip-highlighting as requested by @clemera, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1ed0c4aabb 153/204: Fix typo, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 0ebc884693 154/204: Update manual to not recommend icomplete anymore, ELPA Syncer, 2022/01/11