From: Eshel Yaron Date: Sat, 13 Jul 2024 16:16:43 +0000 (+0200) Subject: Indicate completion strictness in minibuffer prompt X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b9e252a013b5321d9190e0bc372fe0175c70c88c;p=emacs.git Indicate completion strictness in minibuffer prompt --- 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