diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-23 00:37:31 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-23 00:37:31 -0700 |
commit | 7efb4e0e62ed3e11e20d15821342c322b4101ae7 (patch) | |
tree | 5959727f87d23f06389a138ed5dcb555d4eefbff /src/minibuf.c | |
parent | ff5844ad0bc84ea05e1f57827a040a31f54b8a9c (diff) | |
parent | 4e3232657c0fe231e594fb75bea2daee2388b978 (diff) | |
download | emacs-7efb4e0e62ed3e11e20d15821342c322b4101ae7.tar.gz |
Merge from trunk.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r-- | src/minibuf.c | 81 |
1 files changed, 1 insertions, 80 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index 2b5e94ad356..576bca43068 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -72,7 +72,6 @@ Lisp_Object Qcompletion_ignore_case; static Lisp_Object Qminibuffer_completion_table; static Lisp_Object Qminibuffer_completion_predicate; static Lisp_Object Qminibuffer_completion_confirm; -static Lisp_Object Qcompleting_read_default; static Lisp_Object Quser_variable_p; static Lisp_Object Qminibuffer_default; @@ -1692,7 +1691,7 @@ 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[0] = Fsymbol_value (intern ("completing-read-function")); args[1] = prompt; args[2] = collection; args[3] = predicate; @@ -1703,76 +1702,6 @@ See also `completing-read-function'. */) 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; - Lisp_Object init; - int pos = 0; - int count = SPECPDL_INDEX (); - struct gcpro gcpro1; - - init = initial_input; - GCPRO1 (def); - - specbind (Qminibuffer_completion_table, collection); - specbind (Qminibuffer_completion_predicate, predicate); - specbind (Qminibuffer_completion_confirm, - EQ (require_match, Qt) ? Qnil : require_match); - - position = Qnil; - if (!NILP (init)) - { - if (CONSP (init)) - { - position = Fcdr (init); - init = Fcar (init); - } - CHECK_STRING (init); - if (!NILP (position)) - { - CHECK_NUMBER (position); - /* Convert to distance from end of input. */ - pos = XINT (position) - SCHARS (init); - } - } - - if (SYMBOLP (hist)) - { - histvar = hist; - histpos = Qnil; - } - else - { - histvar = Fcar_safe (hist); - histpos = Fcdr_safe (hist); - } - if (NILP (histvar)) - histvar = Qminibuffer_history; - if (NILP (histpos)) - XSETFASTINT (histpos, 0); - - val = read_minibuf (NILP (require_match) - ? (NILP (Vminibuffer_completing_file_name) - || EQ (Vminibuffer_completing_file_name, Qlambda) - ? Vminibuffer_local_completion_map - : Vminibuffer_local_filename_completion_map) - : (NILP (Vminibuffer_completing_file_name) - || EQ (Vminibuffer_completing_file_name, Qlambda) - ? Vminibuffer_local_must_match_map - : Vminibuffer_local_filename_must_match_map), - init, prompt, make_number (pos), 0, - histvar, histpos, def, 0, - !NILP (inherit_input_method)); - - if (STRINGP (val) && SCHARS (val) == 0 && ! NILP (def)) - val = CONSP (def) ? XCAR (def) : def; - - RETURN_UNGCPRO (unbind_to (count, val)); -} Lisp_Object Fassoc_string (register Lisp_Object key, Lisp_Object list, Lisp_Object case_fold); @@ -2011,7 +1940,6 @@ syms_of_minibuf (void) minibuf_save_list = Qnil; staticpro (&minibuf_save_list); - DEFSYM (Qcompleting_read_default, "completing-read-default"); DEFSYM (Qcompletion_ignore_case, "completion-ignore-case"); DEFSYM (Qread_file_name_internal, "read-file-name-internal"); DEFSYM (Qminibuffer_default, "minibuffer-default"); @@ -2130,12 +2058,6 @@ If the value is `confirm-after-completion', the user may exit with an 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; @@ -2212,5 +2134,4 @@ properties. */); defsubr (&Stest_completion); defsubr (&Sassoc_string); defsubr (&Scompleting_read); - defsubr (&Scompleting_read_default); } |