diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-11-28 19:11:58 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-11-28 19:11:58 +0000 |
commit | f8d106b0f806da2527a702ef80e16be1f6636fea (patch) | |
tree | f7c36ce775c5735c718c71b06a4befb75665c169 /lisp/complete.el | |
parent | 8ce9231f25c7dc83b432a495fcc4f2e7ae43e278 (diff) | |
download | emacs-f8d106b0f806da2527a702ef80e16be1f6636fea.tar.gz |
(PC-do-complete-and-exit): Synch to 2008-11-24 change to
minibuffer.el; recognize `confirm' and `confirm-after-completion'
values for minibuffer-completion-confirm.
Diffstat (limited to 'lisp/complete.el')
-rw-r--r-- | lisp/complete.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/complete.el b/lisp/complete.el index 6626b7b959e..f60763e4250 100644 --- a/lisp/complete.el +++ b/lisp/complete.el @@ -330,13 +330,22 @@ See `PC-complete' for details." ((= (point-max) (minibuffer-prompt-end)) ;; Duplicate the "bug" that Info-menu relies on... (exit-minibuffer)) - ((eq minibuffer-completion-confirm 'confirm-only) + ((eq minibuffer-completion-confirm 'confirm) (if (or (eq last-command this-command) (test-completion (field-string) minibuffer-completion-table minibuffer-completion-predicate)) (exit-minibuffer) (PC-temp-minibuffer-message " [Confirm]"))) + ((eq minibuffer-completion-confirm 'confirm-after-completion) + ;; Similar to the above, but only if trying to exit immediately + ;; after typing TAB (this catches most minibuffer typos). + (if (and (memq last-command '(PC-complete minibuffer-complete)) + (not (test-completion (field-string) + minibuffer-completion-table + minibuffer-completion-predicate))) + (PC-temp-minibuffer-message " [Confirm]") + (exit-minibuffer))) (t (let ((flag (PC-do-completion 'exit))) (and flag |