From 890999e1c89c4fdffed82c3f036598795e49f56d Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Sun, 3 Mar 2024 18:52:12 +0100 Subject: Rename orderless--anchored-quoted-regexp to orderless--literal-prefix-p Clarify the relation to orderless-literal-prefix. --- orderless.el | 4 ++-- 1 file 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)))) -- cgit v1.0