From: Morgan Smith Date: Mon, 5 Jun 2023 17:34:59 +0000 (-0400) Subject: Don't ding when completion succeeded X-Git-Tag: emacs-29.0.92~38 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0d8b69e0ad3;p=emacs.git Don't ding when completion succeeded * lisp/minibuffer.el (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. (Bug#63913) --- diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index a873e5f9747..44226449af2 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2388,9 +2388,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))