changeset 99463:1620ef046b91

(file_name_completion): If completion_ignore_case is enabled, ignore case when checking completion-regexp-list.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 08 Nov 2008 16:55:23 +0000
parents 56b4b2a10e6a
children 6aa6a39cd1cd
files src/dired.c
diffstat 1 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/dired.c	Sat Nov 08 16:55:09 2008 +0000
+++ b/src/dired.c	Sat Nov 08 16:55:23 2008 +0000
@@ -631,10 +631,21 @@
 	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;
       }