comparison src/minibuf.c @ 83407:37d0562504bf

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-664 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-665 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-666 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-447
author Karoly Lorentey <lorentey@elte.hu>
date Sat, 10 Dec 2005 21:18:28 +0000
parents 1955a4462bf9 8fd060c85b66
children 14a4eb789b45
comparison
equal deleted inserted replaced
83406:8e25aa911e3e 83407:37d0562504bf
1751 histvar = Qminibuffer_history; 1751 histvar = Qminibuffer_history;
1752 if (NILP (histpos)) 1752 if (NILP (histpos))
1753 XSETFASTINT (histpos, 0); 1753 XSETFASTINT (histpos, 0);
1754 1754
1755 val = read_minibuf (NILP (require_match) 1755 val = read_minibuf (NILP (require_match)
1756 ? Vminibuffer_local_completion_map 1756 ? (NILP (Vminibuffer_completing_file_name)
1757 : Vminibuffer_local_must_match_map, 1757 ? Vminibuffer_local_completion_map
1758 : Vminibuffer_local_filename_completion_map)
1759 : (NILP (Vminibuffer_completing_file_name)
1760 ? Vminibuffer_local_must_match_map
1761 : Vminibuffer_local_must_match_filename_map),
1758 init, prompt, make_number (pos), 0, 1762 init, prompt, make_number (pos), 0,
1759 histvar, histpos, def, 0, 1763 histvar, histpos, def, 0,
1760 !NILP (inherit_input_method), 0); 1764 !NILP (inherit_input_method), 0);
1761 1765
1762 if (STRINGP (val) && SCHARS (val) == 0 && ! NILP (def)) 1766 if (STRINGP (val) && SCHARS (val) == 0 && ! NILP (def))
2116 Otherwise try to complete it. If completion leads to a valid completion, 2120 Otherwise try to complete it. If completion leads to a valid completion,
2117 a repetition of this command will exit. */) 2121 a repetition of this command will exit. */)
2118 () 2122 ()
2119 { 2123 {
2120 register int i; 2124 register int i;
2121 Lisp_Object val; 2125 Lisp_Object val, tem;
2122 2126
2123 /* Allow user to specify null string */ 2127 /* Allow user to specify null string */
2124 if (XINT (Fminibuffer_prompt_end ()) == ZV) 2128 if (XINT (Fminibuffer_prompt_end ()) == ZV)
2125 goto exit; 2129 goto exit;
2126 2130
2127 val = Fminibuffer_contents (); 2131 val = Fminibuffer_contents ();
2128 if (!NILP (Ftest_completion (val, 2132 tem = Ftest_completion (val,
2129 Vminibuffer_completion_table, 2133 Vminibuffer_completion_table,
2130 Vminibuffer_completion_predicate))) 2134 Vminibuffer_completion_predicate);
2135 if (!NILP (tem))
2131 { 2136 {
2132 if (completion_ignore_case) 2137 if (completion_ignore_case)
2133 { /* Fixup case of the field, if necessary. */ 2138 { /* Fixup case of the field, if necessary. */
2134 Lisp_Object compl 2139 Lisp_Object compl
2135 = Ftry_completion (val, 2140 = Ftry_completion (val,
2925 initial_define_key (Vminibuffer_local_completion_map, ' ', 2930 initial_define_key (Vminibuffer_local_completion_map, ' ',
2926 "minibuffer-complete-word"); 2931 "minibuffer-complete-word");
2927 initial_define_key (Vminibuffer_local_completion_map, '?', 2932 initial_define_key (Vminibuffer_local_completion_map, '?',
2928 "minibuffer-completion-help"); 2933 "minibuffer-completion-help");
2929 2934
2935 Fdefine_key (Vminibuffer_local_filename_completion_map,
2936 build_string (" "), Qnil);
2937
2930 initial_define_key (Vminibuffer_local_must_match_map, Ctl ('m'), 2938 initial_define_key (Vminibuffer_local_must_match_map, Ctl ('m'),
2931 "minibuffer-complete-and-exit"); 2939 "minibuffer-complete-and-exit");
2932 initial_define_key (Vminibuffer_local_must_match_map, Ctl ('j'), 2940 initial_define_key (Vminibuffer_local_must_match_map, Ctl ('j'),
2933 "minibuffer-complete-and-exit"); 2941 "minibuffer-complete-and-exit");
2942
2943 initial_define_key (Vminibuffer_local_must_match_filename_map, ' ',
2944 "self-insert-command");
2934 } 2945 }
2935 2946
2936 /* arch-tag: 8f69b601-fba3-484c-a6dd-ceaee54a7a73 2947 /* arch-tag: 8f69b601-fba3-484c-a6dd-ceaee54a7a73
2937 (do not change this comment) */ 2948 (do not change this comment) */