(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
(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
Lisp_Object Qminibuffer_completion_table;
Lisp_Object Qminibuffer_completion_predicate;
Lisp_Object Qminibuffer_completion_confirm;
+Lisp_Object Qcompleting_read_default;
+Lisp_Object Vcompleting_read_function;
Lisp_Object Quser_variable_p;
Lisp_Object Qminibuffer_default;
the current input method and the setting of `enable-multibyte-characters'.
Completion ignores case if the ambient value of
- `completion-ignore-case' is non-nil. */)
+ `completion-ignore-case' is non-nil.
+
+See also `completing-read-function'. */)
+ (Lisp_Object prompt, Lisp_Object collection, Lisp_Object predicate, Lisp_Object require_match, Lisp_Object initial_input, Lisp_Object hist, Lisp_Object def, Lisp_Object inherit_input_method)
+{
+ Lisp_Object args[9];
+ args[0] = Vcompleting_read_function;
+ args[1] = prompt;
+ args[2] = collection;
+ args[3] = predicate;
+ args[4] = require_match;
+ args[5] = initial_input;
+ args[6] = hist;
+ args[7] = def;
+ args[8] = inherit_input_method;
+ return Ffuncall (9, args);
+}
+
+DEFUN ("completing-read-default", Fcompleting_read_default, Scompleting_read_default, 2, 8, 0,
+ doc: /* Default method for reading from the minibuffer with completion.
+See `completing-read' for the meaning of the arguments. */)
(Lisp_Object prompt, Lisp_Object collection, Lisp_Object predicate, Lisp_Object require_match, Lisp_Object initial_input, Lisp_Object hist, Lisp_Object def, Lisp_Object inherit_input_method)
{
Lisp_Object val, histvar, histpos, position;
minibuf_save_list = Qnil;
staticpro (&minibuf_save_list);
+ Qcompleting_read_default = intern_c_string ("completing-read-default");
+ staticpro (&Qcompleting_read_default);
+
Qcompletion_ignore_case = intern_c_string ("completion-ignore-case");
staticpro (&Qcompletion_ignore_case);
doc: /* Non-nil means completing file names. */);
Vminibuffer_completing_file_name = Qnil;
+ DEFVAR_LISP ("completing-read-function",
+ &Vcompleting_read_function,
+ doc: /* The function called by `completing-read' to do the work.
+It should accept the same arguments as `completing-read'. */);
+ Vcompleting_read_function = Qcompleting_read_default;
+
DEFVAR_LISP ("minibuffer-help-form", Vminibuffer_help_form,
doc: /* Value that `help-form' takes on inside the minibuffer. */);
Vminibuffer_help_form = Qnil;
defsubr (&Stest_completion);
defsubr (&Sassoc_string);
defsubr (&Scompleting_read);
+ defsubr (&Scompleting_read_default);
}