1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

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)
This commit is contained in:
Morgan Smith 2023-06-05 13:34:59 -04:00 committed by Eli Zaretskii
parent f11e2d3699
commit 0d8b69e0ad

View 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))