]> code.delx.au - gnu-emacs/blobdiff - src/dired.c
(parse_menu_item) [HAVE_NS]: treat new event like NON_ASCII_KEYSTROKE_EVENT, but...
[gnu-emacs] / src / dired.c
index 0ae24f2154893ec924d9dcb6e52a05d7c072122e..0779fcd3c89c55f489509b85ab15ec2527b22c2d 100644 (file)
@@ -1,6 +1,6 @@
 /* Lisp functions for making directory listings.
    Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2002, 2003,
-                 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+                 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -631,10 +631,21 @@ file_name_completion (file, dirname, all_flag, ver_flag, predicate)
        XSETFASTINT (zero, 0);
 
        /* Ignore this element if it fails to match all the regexps.  */
-       for (regexps = Vcompletion_regexp_list; CONSP (regexps);
-            regexps = XCDR (regexps))
-         if (fast_string_match (XCAR (regexps), name) < 0)
-           break;
+       if (completion_ignore_case)
+         {
+           for (regexps = Vcompletion_regexp_list; CONSP (regexps);
+                regexps = XCDR (regexps))
+             if (fast_string_match_ignore_case (XCAR (regexps), name) < 0)
+               break;
+         }
+       else
+         {
+           for (regexps = Vcompletion_regexp_list; CONSP (regexps);
+                regexps = XCDR (regexps))
+             if (fast_string_match (XCAR (regexps), name) < 0)
+               break;
+         }
+
        if (CONSP (regexps))
          continue;
       }