diff options
| author | Omar AntolĂn Camarena <omar.antolin@gmail.com> | 2024-02-15 12:37:16 -0600 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-02-16 06:54:06 +0100 |
| commit | b770a4de47dd81e6ca7e83026dd91a679f7bf6d7 (patch) | |
| tree | 417de436fcaf44b1ee684dc5dc2684f3730ced94 | |
| parent | f172c801361b17e3538bac2eb17645cd24330590 (diff) | |
Remove orderless--predicate-or
This simplifies the semantics: all predicates are and-ed together.
| -rw-r--r-- | orderless.el | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/orderless.el b/orderless.el index eb645d0..706af69 100644 --- a/orderless.el +++ b/orderless.el @@ -414,7 +414,7 @@ non-nil return a pair of a predicate function and the regexps." for pred = nil for regexps = (cl-loop for style in newstyles for res = (funcall style newcomp) - if (functionp res) do (cl-callf orderless--predicate-or pred res) + if (functionp res) do (cl-callf orderless--predicate-and pred res) else if res collect (if (stringp res) `(regexp ,res) res)) when regexps collect (rx-to-string `(or ,@(delete-dups regexps))) into regexps-res when pred do (cl-callf orderless--predicate-and predicate-res pred) @@ -443,10 +443,6 @@ normalized string as argument." "Combine two predicate functions P and Q with `and'." (or (and p q (lambda (x) (and (funcall p x) (funcall q x)))) p q)) -(defun orderless--predicate-or (p q) - "Combine two predicate functions P and Q with `or'." - (or (and p q (lambda (x) (or (funcall p x) (funcall q x)))) p q)) - (defun orderless--compile (string table pred) "Compile STRING to a prefix and a list of regular expressions. The predicate PRED is used to constrain the entries in TABLE." |
