# HG changeset patch # User Chong Yidong # Date 1227899518 0 # Node ID 92d948bc862143046570bff6700fee4f6196e2d2 # Parent 57fc0e782532471ca25fda81e4efbe742ef33bd7 (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. diff -r 57fc0e782532 -r 92d948bc8621 lisp/complete.el --- a/lisp/complete.el Fri Nov 28 19:10:40 2008 +0000 +++ b/lisp/complete.el Fri Nov 28 19:11:58 2008 +0000 @@ -330,13 +330,22 @@ ((= (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