]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't ding when completion succeeded
authorMorgan Smith <Morgan.J.Smith@outlook.com>
Mon, 5 Jun 2023 17:34:59 +0000 (13:34 -0400)
committerEli Zaretskii <eliz@gnu.org>
Sat, 10 Jun 2023 09:10:40 +0000 (12:10 +0300)
* 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)

lisp/minibuffer.el

index a873e5f9747959736cd5f30519fc878218558297..44226449af214eadbef28034777b69e7f8867feb 100644 (file)
@@ -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))