emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/orderless 60da48a698: Add orderless-kwd-file


From: ELPA Syncer
Subject: [elpa] externals/orderless 60da48a698: Add orderless-kwd-file
Date: Sun, 15 Sep 2024 06:58:28 -0400 (EDT)

branch: externals/orderless
commit 60da48a698dc502454ac5563fcdecba1fa16fc99
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Add orderless-kwd-file
---
 orderless-kwd.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/orderless-kwd.el b/orderless-kwd.el
index 73a0fee551..45d09f4f2d 100644
--- a/orderless-kwd.el
+++ b/orderless-kwd.el
@@ -57,6 +57,7 @@
     (cat ,#'orderless-kwd-category)
     (con ,#'orderless-kwd-content)
     (dir ,#'orderless-kwd-directory)
+    (fil ,#'orderless-kwd-file)
     (doc ,#'orderless-kwd-documentation)
     (grp ,#'orderless-kwd-group)
     (mod ,#'orderless-kwd-mode)
@@ -201,6 +202,13 @@ as a flag and does not require input."
       (orderless--match-p pred regexp
                           (buffer-local-value 'default-directory buf)))))
 
+(defun orderless-kwd-file (pred regexp)
+  "Match `buffer-file-truename' against PRED and REGEXP."
+  (lambda (str)
+    (when-let ((buf (orderless-kwd--get-buffer str)))
+      (orderless--match-p pred regexp
+                          (buffer-local-value 'buffer-file-truename buf)))))
+
 ;;;###autoload
 (defun orderless-kwd-dispatch (component _index _total)
   "Match COMPONENT against the keywords in `orderless-kwd-alist'."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]