diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2024-03-03 18:30:22 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-03-03 18:51:58 +0100 |
| commit | 939ceece866e802e4cd8ed7e80c9715f39e7c0ec (patch) | |
| tree | 9e4d6aa74d97ab140d045d338cb7dd88e05f9d08 /orderless.el | |
| parent | 5dcf92a6624911cd85d6fbf42a4cc2980d9afef3 (diff) | |
Rename orderless-prefix to orderless-literal-prefix and register
Avoid confusion with orderless-prefixes. Registering orderless-literal-prefix
with the ^ character has a modest advantage - it makes sure that the prefix
optimization sets in.
Diffstat (limited to 'orderless.el')
| -rw-r--r-- | orderless.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/orderless.el b/orderless.el index 66a7b53..0177133 100644 --- a/orderless.el +++ b/orderless.el @@ -133,6 +133,7 @@ customizing this variable to see a list of them." (?@ . ,#'orderless-annotation) (?, . ,#'orderless-initialism) (?= . ,#'orderless-literal) + (?^ . ,#'orderless-literal-prefix) (?~ . ,#'orderless-flex)) "Alist associating characters to matching styles. The function `orderless-affix-dispatch' uses this list to @@ -145,8 +146,9 @@ matched according the style associated to it." :value-type (choice (const :tag "Annotation" ,#'orderless-annotation) (const :tag "Literal" ,#'orderless-literal) - (const :tag "Regexp" ,#'orderless-regexp) (const :tag "Without literal" ,#'orderless-without-literal) + (const :tag "Literal prefix" ,#'orderless-literal-prefix) + (const :tag "Regexp" ,#'orderless-regexp) (const :tag "Not" ,#'orderless-not) (const :tag "Flex" ,#'orderless-flex) (const :tag "Initialism" ,#'orderless-initialism) @@ -221,7 +223,7 @@ is determined by the values of `completion-ignore-case', "Match COMPONENT as a literal string." `(literal ,component)) -(defun orderless-prefix (component) +(defun orderless-literal-prefix (component) "Match COMPONENT as a literal prefix string." `(seq bos (literal ,component))) |
