branch: elpa/helm commit 9b2fb4b1d89e2bbf6bb30c802c09d62d83f2c21c Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Alow using 'confirm as the output of a REQUIRE-MATCH fn even if this feature is not (yet) available in Emacs. --- helm-core.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/helm-core.el b/helm-core.el index 7fa42e2242..6399049267 100644 --- a/helm-core.el +++ b/helm-core.el @@ -6504,14 +6504,19 @@ message \\='no match'." (defun helm--set-minibuffer-completion-confirm (src) "Return the value of a REQUIRE-MATCH arg in a `completing-read'." - ;; Set `minibuffer-completion-confirm' to 'noexit or - ;; 'exit, according to MUST-MATCH value (possibly a function). + ;; Set `minibuffer-completion-confirm' to 'noexit,'exit or 'confirm according + ;; to MUST-MATCH value (possibly a function). (with-helm-buffer (setq minibuffer-completion-confirm (helm-acase (helm-get-attr 'must-match src) ((guard* (and (functionp it) - (helm-get-selection nil nil src))) - (if (funcall it guard) 'exit 'noexit)) + (helm-get-selection nil nil src))) + (helm-acase (funcall it guard) + ;; Alow using 'confirm as the output of a REQUIRE-MATCH fn even + ;; if this feature is not available in Emacs. + ((confirm confirm-after-completion) it) + ((guard* (eq nil it)) 'noexit) + (t 'exit))) (t it))))) (defun helm-read-string (prompt &optional initial-input history