>From 991ecaa8501a4eee8ab5073587462a0f7e36c488 Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Mon, 5 Jun 2023 13:34:59 -0400 Subject: [PATCH] * lisp/minibuffer.el (minibuffer-completion-help): Only ding when appropriate. (minibuffer-completion-help): Ensure ding is not called on a successful completion. Ensure ding is not called on a failure if completion-fail-discreetly is set. Also change "No completions" to "No match" as that is what is used elsewhere. --- lisp/minibuffer.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index a1379913886..d26866370f1 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2384,9 +2384,11 @@ These include: ;; If there are no completions, or if the current input is already ;; the sole completion, then hide (previous&stale) completions. (minibuffer-hide-completions) - (ding) - (completion--message - (if completions "Sole completion" "No completions"))) + (if completions + (completion--message "Sole completion") + (unless completion-fail-discreetly + (ding) + (completion--message "No match")))) (let* ((last (last completions)) (base-size (or (cdr last) 0)) -- 2.40.1