diff options
| author | Chong Yidong | 2008-11-28 19:11:58 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-11-28 19:11:58 +0000 |
| commit | f8d106b0f806da2527a702ef80e16be1f6636fea (patch) | |
| tree | f7c36ce775c5735c718c71b06a4befb75665c169 | |
| parent | 8ce9231f25c7dc83b432a495fcc4f2e7ae43e278 (diff) | |
| download | emacs-f8d106b0f806da2527a702ef80e16be1f6636fea.tar.gz emacs-f8d106b0f806da2527a702ef80e16be1f6636fea.zip | |
(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.
| -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." | |||
| 330 | ((= (point-max) (minibuffer-prompt-end)) | 330 | ((= (point-max) (minibuffer-prompt-end)) |
| 331 | ;; Duplicate the "bug" that Info-menu relies on... | 331 | ;; Duplicate the "bug" that Info-menu relies on... |
| 332 | (exit-minibuffer)) | 332 | (exit-minibuffer)) |
| 333 | ((eq minibuffer-completion-confirm 'confirm-only) | 333 | ((eq minibuffer-completion-confirm 'confirm) |
| 334 | (if (or (eq last-command this-command) | 334 | (if (or (eq last-command this-command) |
| 335 | (test-completion (field-string) | 335 | (test-completion (field-string) |
| 336 | minibuffer-completion-table | 336 | minibuffer-completion-table |
| 337 | minibuffer-completion-predicate)) | 337 | minibuffer-completion-predicate)) |
| 338 | (exit-minibuffer) | 338 | (exit-minibuffer) |
| 339 | (PC-temp-minibuffer-message " [Confirm]"))) | 339 | (PC-temp-minibuffer-message " [Confirm]"))) |
| 340 | ((eq minibuffer-completion-confirm 'confirm-after-completion) | ||
| 341 | ;; Similar to the above, but only if trying to exit immediately | ||
| 342 | ;; after typing TAB (this catches most minibuffer typos). | ||
| 343 | (if (and (memq last-command '(PC-complete minibuffer-complete)) | ||
| 344 | (not (test-completion (field-string) | ||
| 345 | minibuffer-completion-table | ||
| 346 | minibuffer-completion-predicate))) | ||
| 347 | (PC-temp-minibuffer-message " [Confirm]") | ||
| 348 | (exit-minibuffer))) | ||
| 340 | (t | 349 | (t |
| 341 | (let ((flag (PC-do-completion 'exit))) | 350 | (let ((flag (PC-do-completion 'exit))) |
| 342 | (and flag | 351 | (and flag |