Commit f15ca944 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(PC-do-complete-and-exit): Add support for the new

`confirm-only' confirmation mode.
parent 9db1942d
2007-07-05 Stefan Monnier <monnier@iro.umontreal.ca>
* complete.el (PC-do-complete-and-exit): Add support for the new
`confirm-only' confirmation mode.
2007-07-05 Chong Yidong <cyd@stupidchicken.com>
* cus-edit.el (custom-commands): New variable.
......
......@@ -328,14 +328,24 @@ See `PC-complete' for details."
(PC-do-complete-and-exit)))
(defun PC-do-complete-and-exit ()
(if (= (point-max) (minibuffer-prompt-end)) ; Duplicate the "bug" that Info-menu relies on...
(exit-minibuffer)
(cond
((= (point-max) (minibuffer-prompt-end))
;; Duplicate the "bug" that Info-menu relies on...
(exit-minibuffer))
((eq minibuffer-completion-confirm 'confirm-only)
(if (or (eq last-command this-command)
(test-completion (field-string)
minibuffer-completion-table
minibuffer-completion-predicate))
(exit-minibuffer)
(PC-temp-minibuffer-message " [Confirm]")))
(t
(let ((flag (PC-do-completion 'exit)))
(and flag
(if (or (eq flag 'complete)
(not minibuffer-completion-confirm))
(exit-minibuffer)
(PC-temp-minibuffer-message " [Confirm]"))))))
(PC-temp-minibuffer-message " [Confirm]")))))))
(defun PC-completion-help ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment