diff options
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 99dff70118a..48eb3c9e955 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2010-11-18 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2010-11-18 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * minibuffer.el (completion-fail-discreetly): New var. | ||
| 4 | (completion--do-completion): Use it. | ||
| 5 | |||
| 3 | * electric.el (electric-pair-pairs): New var. | 6 | * electric.el (electric-pair-pairs): New var. |
| 4 | (electric-pair-post-self-insert-function): Use it. | 7 | (electric-pair-post-self-insert-function): Use it. |
| 5 | (electric-layout-post-self-insert-function): Don't insert a before | 8 | (electric-layout-post-self-insert-function): Don't insert a before |
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." | |||
| 530 | (make-variable-buffer-local 'completion-all-sorted-completions) | 530 | (make-variable-buffer-local 'completion-all-sorted-completions) |
| 531 | (defvar completion-cycling nil) | 531 | (defvar completion-cycling nil) |
| 532 | 532 | ||
| 533 | (defvar completion-fail-discreetly nil | ||
| 534 | "If non-nil, stay quiet when there is no match.") | ||
| 535 | |||
| 533 | (defun completion--do-completion (&optional try-completion-function) | 536 | (defun completion--do-completion (&optional try-completion-function) |
| 534 | "Do the completion and return a summary of what happened. | 537 | "Do the completion and return a summary of what happened. |
| 535 | M = completion was performed, the text was Modified. | 538 | M = completion was performed, the text was Modified. |
| @@ -558,7 +561,9 @@ E = after completion we now have an Exact match. | |||
| 558 | (cond | 561 | (cond |
| 559 | ((null comp) | 562 | ((null comp) |
| 560 | (minibuffer-hide-completions) | 563 | (minibuffer-hide-completions) |
| 561 | (ding) (minibuffer-message "No match") (minibuffer--bitset nil nil nil)) | 564 | (unless completion-fail-discreetly |
| 565 | (ding) (minibuffer-message "No match")) | ||
| 566 | (minibuffer--bitset nil nil nil)) | ||
| 562 | ((eq t comp) | 567 | ((eq t comp) |
| 563 | (minibuffer-hide-completions) | 568 | (minibuffer-hide-completions) |
| 564 | (goto-char (field-end)) | 569 | (goto-char (field-end)) |