[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult 1cfc068 1/2: Add consult-crm-selected
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult 1cfc068 1/2: Add consult-crm-selected |
Date: |
Mon, 13 Dec 2021 09:57:17 -0500 (EST) |
branch: externals/consult
commit 1cfc06800bb5663f0e516cd74179256bd738b38d
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Add consult-crm-selected
cc @iyefrat
---
consult.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/consult.el b/consult.el
index 473c7b4..651d147 100644
--- a/consult.el
+++ b/consult.el
@@ -2387,6 +2387,17 @@ These configuration options are supported:
;;;;; Function: consult-completing-read-multiple
+(defun consult-crm-selected ()
+ "Return selected candidates from `consult-completing-read-multiple'."
+ (when (eq minibuffer-history-variable 'consult--crm-history)
+ (all-completions
+ "" minibuffer-completion-table
+ (lambda (cand)
+ (and (stringp cand)
+ (get-text-property 0 'consult--crm-selected cand)
+ (or (not minibuffer-completion-predicate)
+ (funcall minibuffer-completion-predicate cand)))))))
+
;;;###autoload
(defun consult-completing-read-multiple (prompt table &optional
pred require-match
initial-input