]> git.eshelyaron.com Git - emacs.git/commitdiff
(Vminibuffer_completing_file_name): New var.
authorRichard M. Stallman <rms@gnu.org>
Thu, 2 Jul 1998 07:01:21 +0000 (07:01 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 2 Jul 1998 07:01:21 +0000 (07:01 +0000)
(syms_of_minibuf): Set up Lisp variable.
(Fminibuffer_complete_word): Test it, instead of checking
specifically for Qread_file_name_internal.
(Fcompleting_read): Likewise.

src/minibuf.c

index 9f73ea76dada69d57b7946c397c809380340b15b..3771af5704398c9bbad8693e84c2a4c5d993c8ab 100644 (file)
@@ -1276,6 +1276,7 @@ are ignored unless STRING itself starts with a space.")
 Lisp_Object Vminibuffer_completion_table, Qminibuffer_completion_table;
 Lisp_Object Vminibuffer_completion_predicate, Qminibuffer_completion_predicate;
 Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm;
+Lisp_Object Vminibuffer_completing_file_name;
 
 /* This comment supplies the doc string for completing-read,
    for make-docfile to see.  We cannot put this in the real DEFUN
@@ -1324,7 +1325,7 @@ DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0,
   int pos = 0;
   int count = specpdl_ptr - specpdl;
   struct gcpro gcpro1;
-  int disable_multibyte = EQ (table, Qread_file_name_internal);
+  int disable_multibyte = ! NILP (Vminibuffer_completing_file_name); 
 
   GCPRO1 (def);
 
@@ -1700,7 +1701,7 @@ Return nil if there is no valid completion, else t.")
     GCPRO2 (completion, tem);
     /* If reading a file name,
        expand any $ENVVAR refs in the buffer and in TEM.  */
-    if (EQ (Vminibuffer_completion_table, Qread_file_name_internal))
+    if (! NILP (Vminibuffer_completing_file_name))
       {
        Lisp_Object substituted;
        substituted = Fsubstitute_in_file_name (tem);
@@ -2194,6 +2195,11 @@ t means to return a list of all possible completions of STRING.\n\
     "Non-nil => demand confirmation of completion before exiting minibuffer.");
   Vminibuffer_completion_confirm = Qnil;
 
+  DEFVAR_LISP ("minibuffer-completing-file-name",
+              &Vminibuffer_completing_file_name,
+    "Non-nil means completing file names.");
+  Vminibuffer_completing_file_name = Qnil;
+
   DEFVAR_LISP ("minibuffer-help-form", &Vminibuffer_help_form,
     "Value that `help-form' takes on inside the minibuffer.");
   Vminibuffer_help_form = Qnil;