diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2024-03-03 14:05:52 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-03-03 14:19:37 +0100 |
| commit | 998912ca17166b1a7bbc1f2ad59d86f7228b866a (patch) | |
| tree | f3699f8d701ea3eb40cd971420d06282552c0247 | |
| parent | 1b7ca9a8b500250c4e560e01ff1190daa906109f (diff) | |
README: Document orderless-prefix
| -rw-r--r-- | README.org | 5 | ||||
| -rw-r--r-- | orderless.texi | 6 |
2 files changed, 9 insertions, 2 deletions
@@ -133,6 +133,9 @@ 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-prefixes :: the component is split at word endings and each piece must match at a word boundary in the candidate, occurring in that order. @@ -241,7 +244,7 @@ Style modifiers should not be used directly in (defun not-if-bang (pattern _index _total) (cond ((equal "!" pattern) - '(orderless-literal . "")) + #'ignore) ((string-prefix-p "!" pattern) `(orderless-not . ,(substring pattern 1))))) diff --git a/orderless.texi b/orderless.texi index 7602947..9e8c7d4 100644 --- a/orderless.texi +++ b/orderless.texi @@ -169,6 +169,10 @@ 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-prefixes the component is split at word endings and each piece must match at a word boundary in the candidate, occurring @@ -307,7 +311,7 @@ You can achieve this with the following configuration: (defun not-if-bang (pattern _index _total) (cond ((equal "!" pattern) - '(orderless-literal . "")) + #'ignore) ((string-prefix-p "!" pattern) `(orderless-not . ,(substring pattern 1))))) |
