diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-11-17 21:44:44 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-11-17 21:44:44 -0500 |
commit | b7e270a2c46ee2d7df7f97fff5a16089ea55622b (patch) | |
tree | d40527d41fe6bd1fb31c2f48c169a5d8c537c47c /lisp/minibuffer.el | |
parent | c51bb5d2c2f0e090e6c71309e393ace47d3061f4 (diff) | |
download | emacs-b7e270a2c46ee2d7df7f97fff5a16089ea55622b.tar.gz |
* lisp/minibuffer.el (completion-fail-discreetly): New var.
(completion--do-completion): Use it.
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r-- | lisp/minibuffer.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 0275dc1923b..78580c86e45 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -530,6 +530,9 @@ candidates than this number." (make-variable-buffer-local 'completion-all-sorted-completions) (defvar completion-cycling nil) +(defvar completion-fail-discreetly nil + "If non-nil, stay quiet when there is no match.") + (defun completion--do-completion (&optional try-completion-function) "Do the completion and return a summary of what happened. M = completion was performed, the text was Modified. @@ -558,7 +561,9 @@ E = after completion we now have an Exact match. (cond ((null comp) (minibuffer-hide-completions) - (ding) (minibuffer-message "No match") (minibuffer--bitset nil nil nil)) + (unless completion-fail-discreetly + (ding) (minibuffer-message "No match")) + (minibuffer--bitset nil nil nil)) ((eq t comp) (minibuffer-hide-completions) (goto-char (field-end)) |