diff options
| author | Stefan Monnier | 2007-07-05 19:42:43 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-07-05 19:42:43 +0000 |
| commit | f15ca9448322563c50e70e81d62c31eb57df0ae3 (patch) | |
| tree | 28b431ccc7a90a91c5d566548387b11d3ca31a7c | |
| parent | 9db1942d9a0b5e3fe69d585c1ce52d97e9376fce (diff) | |
| download | emacs-f15ca9448322563c50e70e81d62c31eb57df0ae3.tar.gz emacs-f15ca9448322563c50e70e81d62c31eb57df0ae3.zip | |
(PC-do-complete-and-exit): Add support for the new
`confirm-only' confirmation mode.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/complete.el | 16 |
2 files changed, 18 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 30badf7f856..653dd294452 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-07-05 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * complete.el (PC-do-complete-and-exit): Add support for the new | ||
| 4 | `confirm-only' confirmation mode. | ||
| 5 | |||
| 1 | 2007-07-05 Chong Yidong <cyd@stupidchicken.com> | 6 | 2007-07-05 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * cus-edit.el (custom-commands): New variable. | 8 | * cus-edit.el (custom-commands): New variable. |
diff --git a/lisp/complete.el b/lisp/complete.el index 3f83296474d..b90553b1816 100644 --- a/lisp/complete.el +++ b/lisp/complete.el | |||
| @@ -328,14 +328,24 @@ See `PC-complete' for details." | |||
| 328 | (PC-do-complete-and-exit))) | 328 | (PC-do-complete-and-exit))) |
| 329 | 329 | ||
| 330 | (defun PC-do-complete-and-exit () | 330 | (defun PC-do-complete-and-exit () |
| 331 | (if (= (point-max) (minibuffer-prompt-end)) ; Duplicate the "bug" that Info-menu relies on... | 331 | (cond |
| 332 | (exit-minibuffer) | 332 | ((= (point-max) (minibuffer-prompt-end)) |
| 333 | ;; Duplicate the "bug" that Info-menu relies on... | ||
| 334 | (exit-minibuffer)) | ||
| 335 | ((eq minibuffer-completion-confirm 'confirm-only) | ||
| 336 | (if (or (eq last-command this-command) | ||
| 337 | (test-completion (field-string) | ||
| 338 | minibuffer-completion-table | ||
| 339 | minibuffer-completion-predicate)) | ||
| 340 | (exit-minibuffer) | ||
| 341 | (PC-temp-minibuffer-message " [Confirm]"))) | ||
| 342 | (t | ||
| 333 | (let ((flag (PC-do-completion 'exit))) | 343 | (let ((flag (PC-do-completion 'exit))) |
| 334 | (and flag | 344 | (and flag |
| 335 | (if (or (eq flag 'complete) | 345 | (if (or (eq flag 'complete) |
| 336 | (not minibuffer-completion-confirm)) | 346 | (not minibuffer-completion-confirm)) |
| 337 | (exit-minibuffer) | 347 | (exit-minibuffer) |
| 338 | (PC-temp-minibuffer-message " [Confirm]")))))) | 348 | (PC-temp-minibuffer-message " [Confirm]"))))))) |
| 339 | 349 | ||
| 340 | 350 | ||
| 341 | (defun PC-completion-help () | 351 | (defun PC-completion-help () |