diff options
| -rw-r--r-- | README.org | 5 | ||||
| -rw-r--r-- | orderless.el | 6 | ||||
| -rw-r--r-- | orderless.texi | 8 |
3 files changed, 12 insertions, 7 deletions
@@ -133,8 +133,8 @@ matching styles are: - orderless-literal :: the component is treated as a literal string that must occur in the candidate. -- orderless-prefix :: the component is treated as a literal string - that must occur as a prefix of a candidate. +- orderless-literal-prefix :: the component is treated as a literal + string that must occur as a prefix of a candidate. - orderless-prefixes :: the component is split at word endings and each piece must match at a word boundary in the candidate, occurring @@ -195,6 +195,7 @@ Style modifiers should not be used directly in will match against the candidate's annotation. - , uses =orderless-initialism=. - = uses =orderless-literal=. + - ^ uses =orderless-literal-prefix=. - ~ uses =orderless-flex=. - % makes the string match ignoring diacritics and similar inflections on characters (it uses the function 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))) diff --git a/orderless.texi b/orderless.texi index 9e8c7d4..b381aa2 100644 --- a/orderless.texi +++ b/orderless.texi @@ -169,9 +169,9 @@ If the component is not a valid regexp, it is ignored. the component is treated as a literal string that must occur in the candidate. -@item orderless-prefix -the component is treated as a literal string -that must occur as a prefix of a candidate. +@item orderless-literal-prefix +the component is treated as a literal +string that must occur as a prefix of a candidate. @item orderless-prefixes the component is split at word endings and @@ -254,6 +254,8 @@ will match against the candidate's annotation. @item = uses @samp{orderless-literal}. @item +^ uses @samp{orderless-literal-prefix}. +@item ~ uses @samp{orderless-flex}. @item % makes the string match ignoring diacritics and similar |
