1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

New variable completing-read-function to customize completing-read

This commit is contained in:
Leo Liu 2011-03-20 18:35:27 +08:00
parent 7d476bdec5
commit 3ec03f7e46
5 changed files with 51 additions and 5 deletions

View file

@ -1983,7 +1983,7 @@ If INITIAL is non-nil, it specifies the initial input string."
(setq ido-exit nil)
(setq ido-final-text
(catch 'ido
(completing-read
(completing-read-default
(ido-make-prompt item prompt)
'(("dummy" . 1)) nil nil ; table predicate require-match
(prog1 ido-text-init (setq ido-text-init nil)) ;initial-contents
@ -4740,13 +4740,13 @@ See `read-directory-name' for additional parameters."
(concat ido-current-directory filename)))))
;;;###autoload
(defun ido-completing-read (prompt choices &optional predicate require-match initial-input hist def)
(defun ido-completing-read (prompt choices &optional predicate require-match initial-input hist def inherit-input-method)
"Ido replacement for the built-in `completing-read'.
Read a string in the minibuffer with ido-style completion.
PROMPT is a string to prompt with; normally it ends in a colon and a space.
CHOICES is a list of strings which are the possible completions.
PREDICATE is currently ignored; it is included to be compatible
with `completing-read'.
PREDICATE and INHERIT-INPUT-METHOD is currently ignored; it is included
to be compatible with `completing-read'.
If REQUIRE-MATCH is non-nil, the user is not allowed to exit unless
the input is (or completes to) an element of CHOICES or is null.
If the input is null, `ido-completing-read' returns DEF, or an empty