From b9e252a013b5321d9190e0bc372fe0175c70c88c Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 13 Jul 2024 18:16:43 +0200 Subject: [PATCH] Indicate completion strictness in minibuffer prompt --- lisp/minibuffer.el | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 8558a1d63ca..08a5ef7bcbc 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -4367,8 +4367,22 @@ possible completions." :group 'minibuffer :risky t) -(defcustom minibuffer-completion-prompt-indicator ">" - "String to show in minibuffer prompt when completion is available." +(defcustom minibuffer-strict-prompt-indicator "=>" + "String to show in minibuffer prompt to indicate strict completion." + :type 'string + :version "31.1" + :group 'minibuffer + :risky t) + +(defcustom minibuffer-lax-with-confirmation-prompt-indicator ">" + "String to show in minibuffer prompt for lax completion with confirmation." + :type 'string + :version "31.1" + :group 'minibuffer + :risky t) + +(defcustom minibuffer-lax-prompt-indicator ">" + "String to show in minibuffer prompt to indicate lax completion." :type 'string :version "31.1" :group 'minibuffer @@ -4386,9 +4400,17 @@ possible completions." (defvar minibuffer-completion-prompt-indicator-format '(minibuffer-completion-table - (:propertize minibuffer-completion-prompt-indicator - help-echo "Completion available" - mouse-face minibuffer-completion-prompt-indicator-highlight))) + (minibuffer--require-match + (minibuffer-completion-confirm + (:propertize minibuffer-lax-with-confirmation-prompt-indicator + help-echo "Lax completion with confirmation" + mouse-face minibuffer-completion-prompt-indicator-highlight) + (:propertize minibuffer-strict-prompt-indicator + help-echo "Strict completion" + mouse-face minibuffer-completion-prompt-indicator-highlight)) + (:propertize minibuffer-lax-prompt-indicator + help-echo "Lax completion" + mouse-face minibuffer-completion-prompt-indicator-highlight)))) (dolist (sym '(minibuffer-action-prompt-indicator-format minibuffer-extra-prompt-indicators-format -- 2.39.2