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

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

[nongnu] elpa/helm ad4d59a1b7 1/3: Handle must-match functions in helm--


From: ELPA Syncer
Subject: [nongnu] elpa/helm ad4d59a1b7 1/3: Handle must-match functions in helm--set-minibuffer-completion-confirm
Date: Tue, 30 Jan 2024 10:00:02 -0500 (EST)

branch: elpa/helm
commit ad4d59a1b7c027ea1a8f44f3c94c44fe5d93c674
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Handle must-match functions in helm--set-minibuffer-completion-confirm
---
 helm-core.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index bb93a4b6e2..47abdd14ca 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -6331,8 +6331,12 @@ message \\='no match'."
 
 (defun helm--set-minibuffer-completion-confirm (src)
   (with-helm-buffer
-    (helm-aif (helm-get-attr 'must-match src)
-        (setq minibuffer-completion-confirm it))))
+    (setq minibuffer-completion-confirm
+          (pcase (helm-get-attr 'must-match src)
+            ((and (pred functionp) fun
+                  (let sel (helm-get-selection nil 'withprop src)))
+             (funcall fun sel))
+            (val val)))))
 
 (defun helm-read-string (prompt &optional initial-input history
                                 default-value inherit-input-method)



reply via email to

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