diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2024-03-03 18:52:12 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-03-03 18:52:22 +0100 |
| commit | 890999e1c89c4fdffed82c3f036598795e49f56d (patch) | |
| tree | 51d1524fda573137255dbc4d30969d7a19082d69 /orderless.el | |
| parent | 939ceece866e802e4cd8ed7e80c9715f39e7c0ec (diff) | |
Rename orderless--anchored-quoted-regexp to orderless--literal-prefix-p
Clarify the relation to orderless-literal-prefix.
Diffstat (limited to 'orderless.el')
| -rw-r--r-- | orderless.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/orderless.el b/orderless.el index 0177133..38a2624 100644 --- a/orderless.el +++ b/orderless.el @@ -493,7 +493,7 @@ The predicate PRED is used to constrain the entries in TABLE." ;; Thanks to @jakanakaevangeli for writing a version of this function: ;; https://github.com/oantolin/orderless/issues/79#issuecomment-916073526 -(defun orderless--anchored-quoted-regexp (regexp) +(defun orderless--literal-prefix-p (regexp) "Determine if REGEXP is a quoted regexp anchored at the beginning. If REGEXP is of the form \"\\(?:\\`q\\)\" for q = (regexp-quote u), then return (cons REGEXP u); else return nil." @@ -520,7 +520,7 @@ The matching should be case-insensitive if IGNORE-CASE is non-nil." ;; If there is a regexp of the form \(?:\`quoted-regexp\) then ;; remove the first such and add the unquoted form to the prefix. (pcase (cl-loop for r in regexps - thereis (orderless--anchored-quoted-regexp r)) + thereis (orderless--literal-prefix-p r)) (`(,regexp . ,literal) (setq prefix (concat prefix literal) regexps (remove regexp regexps)))) |
