Mercurial > emacs
comparison src/minibuf.c @ 22657:d19cd2986f18
(Vminibuffer_completing_file_name): New var.
(syms_of_minibuf): Set up Lisp variable.
(Fminibuffer_complete_word): Test it, instead of checking
specifically for Qread_file_name_internal.
(Fcompleting_read): Likewise.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 02 Jul 1998 07:01:21 +0000 |
parents | a57016ec7f14 |
children | 1e29148859d4 |
comparison
equal
deleted
inserted
replaced
22656:e3dc0aa099e5 | 22657:d19cd2986f18 |
---|---|
1274 } | 1274 } |
1275 | 1275 |
1276 Lisp_Object Vminibuffer_completion_table, Qminibuffer_completion_table; | 1276 Lisp_Object Vminibuffer_completion_table, Qminibuffer_completion_table; |
1277 Lisp_Object Vminibuffer_completion_predicate, Qminibuffer_completion_predicate; | 1277 Lisp_Object Vminibuffer_completion_predicate, Qminibuffer_completion_predicate; |
1278 Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm; | 1278 Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm; |
1279 Lisp_Object Vminibuffer_completing_file_name; | |
1279 | 1280 |
1280 /* This comment supplies the doc string for completing-read, | 1281 /* This comment supplies the doc string for completing-read, |
1281 for make-docfile to see. We cannot put this in the real DEFUN | 1282 for make-docfile to see. We cannot put this in the real DEFUN |
1282 due to limits in the Unix cpp. | 1283 due to limits in the Unix cpp. |
1283 | 1284 |
1322 { | 1323 { |
1323 Lisp_Object val, histvar, histpos, position; | 1324 Lisp_Object val, histvar, histpos, position; |
1324 int pos = 0; | 1325 int pos = 0; |
1325 int count = specpdl_ptr - specpdl; | 1326 int count = specpdl_ptr - specpdl; |
1326 struct gcpro gcpro1; | 1327 struct gcpro gcpro1; |
1327 int disable_multibyte = EQ (table, Qread_file_name_internal); | 1328 int disable_multibyte = ! NILP (Vminibuffer_completing_file_name); |
1328 | 1329 |
1329 GCPRO1 (def); | 1330 GCPRO1 (def); |
1330 | 1331 |
1331 specbind (Qminibuffer_completion_table, table); | 1332 specbind (Qminibuffer_completion_table, table); |
1332 specbind (Qminibuffer_completion_predicate, predicate); | 1333 specbind (Qminibuffer_completion_predicate, predicate); |
1698 CHECK_STRING (completion, 0); | 1699 CHECK_STRING (completion, 0); |
1699 tem = Fbuffer_string (); | 1700 tem = Fbuffer_string (); |
1700 GCPRO2 (completion, tem); | 1701 GCPRO2 (completion, tem); |
1701 /* If reading a file name, | 1702 /* If reading a file name, |
1702 expand any $ENVVAR refs in the buffer and in TEM. */ | 1703 expand any $ENVVAR refs in the buffer and in TEM. */ |
1703 if (EQ (Vminibuffer_completion_table, Qread_file_name_internal)) | 1704 if (! NILP (Vminibuffer_completing_file_name)) |
1704 { | 1705 { |
1705 Lisp_Object substituted; | 1706 Lisp_Object substituted; |
1706 substituted = Fsubstitute_in_file_name (tem); | 1707 substituted = Fsubstitute_in_file_name (tem); |
1707 if (! EQ (substituted, tem)) | 1708 if (! EQ (substituted, tem)) |
1708 { | 1709 { |
2192 | 2193 |
2193 DEFVAR_LISP ("minibuffer-completion-confirm", &Vminibuffer_completion_confirm, | 2194 DEFVAR_LISP ("minibuffer-completion-confirm", &Vminibuffer_completion_confirm, |
2194 "Non-nil => demand confirmation of completion before exiting minibuffer."); | 2195 "Non-nil => demand confirmation of completion before exiting minibuffer."); |
2195 Vminibuffer_completion_confirm = Qnil; | 2196 Vminibuffer_completion_confirm = Qnil; |
2196 | 2197 |
2198 DEFVAR_LISP ("minibuffer-completing-file-name", | |
2199 &Vminibuffer_completing_file_name, | |
2200 "Non-nil means completing file names."); | |
2201 Vminibuffer_completing_file_name = Qnil; | |
2202 | |
2197 DEFVAR_LISP ("minibuffer-help-form", &Vminibuffer_help_form, | 2203 DEFVAR_LISP ("minibuffer-help-form", &Vminibuffer_help_form, |
2198 "Value that `help-form' takes on inside the minibuffer."); | 2204 "Value that `help-form' takes on inside the minibuffer."); |
2199 Vminibuffer_help_form = Qnil; | 2205 Vminibuffer_help_form = Qnil; |
2200 | 2206 |
2201 DEFVAR_LISP ("minibuffer-history-variable", &Vminibuffer_history_variable, | 2207 DEFVAR_LISP ("minibuffer-history-variable", &Vminibuffer_history_variable, |