emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

add read-file-name-completion-ignore-case user variable ?


From: John Paul Wallington
Subject: add read-file-name-completion-ignore-case user variable ?
Date: Thu, 24 Jun 2004 23:24:06 +0100

Stef's change of 2004-03-17 to `read-file-name' to set
completion-ignore-case for case-insensitive systems is hard for users
to configure -- Viktor Haag pointed this out on the gnu.emacs.help
newsgroup.

How about having a `read-file-name-completion-ignore-case' user
variable rather than hard-coding a value according to system type?
We could still set its default value according to system type.

2004-06-24  John Paul Wallington  <address@hidden>

        * fileio.c (read_file_name_completion_ignore_case): New variable.
        (syms_of_fileio): Declare and initialise it.
        (Fread_file_name): Bind completion_ignore_case to respect it.

Index: fileio.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fileio.c,v
retrieving revision 1.505
diff -u -r1.505 fileio.c
--- fileio.c    22 May 2004 22:17:17 -0000      1.505
+++ fileio.c    24 Jun 2004 22:24:35 -0000
@@ -206,6 +206,9 @@
 /* Current predicate used by read_file_name_internal.  */
 Lisp_Object Vread_file_name_predicate;
 
+/* Nonzero means completion ignores case when reading file name*/
+int read_file_name_completion_ignore_case;
+
 /* Nonzero means, when reading a filename in the minibuffer,
  start out by inserting the default directory into the minibuffer. */
 int insert_default_directory;
@@ -6284,10 +6287,8 @@
     }
 
   count = SPECPDL_INDEX ();
-#if defined VMS || defined DOS_NT || defined MAC_OSX
-  specbind (intern ("completion-ignore-case"), Qt);
-#endif
-
+  specbind (intern ("completion-ignore-case"),
+           read_file_name_completion_ignore_case ? Qt : Qnil);
   specbind (intern ("minibuffer-completing-file-name"), Qt);
   specbind (intern ("read-file-name-predicate"),
            (NILP (predicate) ? Qfile_exists_p : predicate));
@@ -6523,6 +6524,10 @@
               doc: /* Current predicate used by `read-file-name-internal'.  
*/);
   Vread_file_name_predicate = Qnil;
 
+  DEFVAR_BOOL ("read-file-name-completion-ignore-case", 
&read_file_name_completion_ignore_case,
+              doc: /* *Non-nil means when reading a file name completion 
ignores case.  */);
+  read_file_name_completion_ignore_case = 0;
+
   DEFVAR_BOOL ("insert-default-directory", &insert_default_directory,
               doc: /* *Non-nil means when reading a filename start with 
default dir in minibuffer.
 If the initial minibuffer contents are non-empty, you can usually




reply via email to

[Prev in Thread] Current Thread [Next in Thread]