summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-02-16 06:48:27 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2024-02-16 07:13:23 +0100
commita89ac17b41f993d90cf341ec350efca403e752f2 (patch)
treeef2869735bc13e16a51b97bfa31f82147ede050d
parent604c05f436e159a771fa8fb58bae6dab91be7aa5 (diff)
orderless-affix-dispatch: Ignore single dispatcher character
-rw-r--r--orderless.el20
1 files changed, 8 insertions, 12 deletions
diff --git a/orderless.el b/orderless.el
index e2ad552..056dd3a 100644
--- a/orderless.el
+++ b/orderless.el
@@ -161,12 +161,10 @@ as a key in `orderless-affix-dispatch-alist', then that character
is removed and the remainder of the COMPONENT is matched in the
style associated to the character."
(cond
- ;; Ignore single without-literal dispatcher
- ((and (= (length component) 1)
- (equal (aref component 0)
- (car (rassq #'orderless-without-literal
- orderless-affix-dispatch-alist))))
- '(orderless-literal . ""))
+ ;; Ignore single dispatcher character
+ ((and (= (length component) 1) (alist-get (aref component 0)
+ orderless-affix-dispatch-alist))
+ #'ignore)
;; Prefix
((when-let ((style (alist-get (aref component 0)
orderless-affix-dispatch-alist)))
@@ -276,15 +274,13 @@ regexp."
(defun orderless-without (component)
"Match strings that do *not* match COMPONENT."
- (unless (equal component "")
- (let ((regexp (cdr (orderless--component-compiler component))))
- (lambda (str)
- (not (string-match-p regexp str))))))
+ (let ((regexp (cdr (orderless--compile-component component))))
+ (lambda (str)
+ (not (string-match-p regexp str)))))
(defun orderless-annotation (component)
"Match candidates where the annotation matches COMPONENT."
- (when-let (((not (equal component "")))
- ((minibufferp))
+ (when-let (((minibufferp))
(table minibuffer-completion-table)
(metadata (completion-metadata
(buffer-substring-no-properties (minibuffer-prompt-end) (point))