branch: externals/orderless
commit 7e57a5458ce84f32345a7d96e93105fd6b18cae7
Author: Omar Antolín <[email protected]>
Commit: Omar Antolín <[email protected]>
Allow dispatcher to modify component without handling it
This needs to be documented
---
orderless.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/orderless.el b/orderless.el
index 2f3836ff7d..8c21ef0308 100644
--- a/orderless.el
+++ b/orderless.el
@@ -281,9 +281,12 @@ match."
(cl-loop
for component in (split-string pattern orderless-component-separator)
and index from 0
- for styles = (or (run-hook-with-args-until-success
- 'orderless-style-dispatchers component index)
- orderless-component-matching-styles)
+ for styles = (cl-loop for dispatcher in orderless-style-dispatchers
+ for result = (funcall dispatcher component index)
+ when (stringp result)
+ do (setq component result result nil)
+ thereis result
+ finally (return orderless-component-matching-styles))
when (and (consp styles) (stringp (cdr styles)))
;; dispatcher requested component change
do (setq component (cdr styles) styles (car styles))