[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless add8d5af3a 24/25: Break long lines
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless add8d5af3a 24/25: Break long lines |
Date: |
Wed, 21 Feb 2024 12:58:52 -0500 (EST) |
branch: externals/orderless
commit add8d5af3af8cadbba60e68c1b3c78cf9b8b3475
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Break long lines
---
orderless.el | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/orderless.el b/orderless.el
index f1d7868f39..26c4783ee8 100644
--- a/orderless.el
+++ b/orderless.el
@@ -283,12 +283,17 @@ which can invert any predicate or regexp."
(when-let (((minibufferp))
(table minibuffer-completion-table)
(metadata (completion-metadata
- (buffer-substring-no-properties
(minibuffer-prompt-end) (point))
+ (buffer-substring-no-properties
+ (minibuffer-prompt-end) (point))
table minibuffer-completion-predicate))
- (fun (or (completion-metadata-get metadata 'annotation-function)
- (plist-get completion-extra-properties
:annotation-function)
- (when-let ((aff (or (completion-metadata-get metadata
'affixation-function)
- (plist-get
completion-extra-properties :affixation-function))))
+ (fun (or (completion-metadata-get
+ metadata 'annotation-function)
+ (plist-get completion-extra-properties
+ :annotation-function)
+ (when-let ((aff (or (completion-metadata-get
+ metadata 'affixation-function)
+ (plist-get
completion-extra-properties
+ :affixation-function))))
(lambda (cand) (caddr (funcall aff (list cand))))))))
(lambda (str)
(when-let ((ann (funcall fun str)))
@@ -381,21 +386,24 @@ DEFAULT as the list of styles."
when result return (cons result string)
finally (return (cons default string))))
-(defun orderless--compile-component (component idx total styles dispatchers)
- "Compile COMPONENT at IDX of TOTAL components with STYLES and DISPATCHERS."
+(defun orderless--compile-component (component index total styles dispatchers)
+ "Compile COMPONENT at INDEX of TOTAL components with STYLES and DISPATCHERS."
(cl-loop
with pred = nil
- with (newsty . newcomp) = (orderless--dispatch dispatchers styles component
idx total)
+ with (newsty . newcomp) = (orderless--dispatch dispatchers styles
+ component index total)
for style in (if (functionp newsty) (list newsty) newsty)
for res = (condition-case nil
(funcall style newcomp)
(wrong-number-of-arguments
- (when-let ((res (orderless--compile-component newcomp idx
total styles dispatchers)))
+ (when-let ((res (orderless--compile-component
+ newcomp index total styles dispatchers)))
(funcall style (car res) (cdr res)))))
if (functionp res) do (cl-callf orderless--predicate-and pred res)
else if res collect (if (stringp res) `(regexp ,res) res) into regexps
finally return
- (and (or pred regexps) (cons pred (and regexps (rx-to-string `(or
,@(delete-dups regexps))))))))
+ (when (or pred regexps)
+ (cons pred (and regexps (rx-to-string `(or ,@(delete-dups regexps))))))))
(defun orderless-compile (pattern &optional styles dispatchers)
"Build regexps to match the components of PATTERN.
@@ -424,8 +432,9 @@ string as argument."
(funcall orderless-component-separator pattern)
(split-string pattern orderless-component-separator t))
with total = (length components)
- for comp in components and idx from 0
- for (pred . regexp) = (orderless--compile-component comp idx total styles
dispatchers)
+ for comp in components and index from 0
+ for (pred . regexp) = (orderless--compile-component
+ comp index total styles dispatchers)
when regexp collect regexp into regexps
when pred do (cl-callf orderless--predicate-and predicate pred)
finally return (cons predicate regexps)))
- [elpa] externals/orderless 10bce1bcde 02/25: orderless-annotation, orderless-without-regexp: Check validity, (continued)
- [elpa] externals/orderless 10bce1bcde 02/25: orderless-annotation, orderless-without-regexp: Check validity, ELPA Syncer, 2024/02/21
- [elpa] externals/orderless 0e9fe2e902 03/25: orderless-annotation: Also check completion-extra-properties, ELPA Syncer, 2024/02/21
- [elpa] externals/orderless 7c99212dd3 17/25: Alternative 2: Compile component before passing it to orderless-annotation, ELPA Syncer, 2024/02/21
- [elpa] externals/orderless b56db3eea4 18/25: Turn orderless-annotation/without into a "pattern transformer", ELPA Syncer, 2024/02/21
- [elpa] externals/orderless 37c0083736 14/25: orderless--dispatch: Explicitly specify the arguments, ELPA Syncer, 2024/02/21
- [elpa] externals/orderless 766a194b90 13/25: Use orderless--dispatch in orderless--compile-component, ELPA Syncer, 2024/02/21
- [elpa] externals/orderless fe5b6672b4 15/25: Add comment regarding the orderless--component-compiler calls, ELPA Syncer, 2024/02/21
- [elpa] externals/orderless 258b9f54e1 23/25: README: Fix language after renaming of orderless-pattern-compiler, ELPA Syncer, 2024/02/21
- [elpa] externals/orderless f172c80136 04/25: Extend orderless-without-literal comment, ELPA Syncer, 2024/02/21
- [elpa] externals/orderless c484594875 11/25: Update documentation of orderless-style-dispatchers, ELPA Syncer, 2024/02/21
- [elpa] externals/orderless add8d5af3a 24/25: Break long lines,
ELPA Syncer <=