From cc524e3b21048028222d305d3a8e34ab89da9b3e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 8 Nov 2008 16:55:23 +0000 Subject: [PATCH] (file_name_completion): If completion_ignore_case is enabled, ignore case when checking completion-regexp-list. --- src/dired.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/dired.c b/src/dired.c index 0ae24f21548..5e8bb39bee2 100644 --- a/src/dired.c +++ b/src/dired.c @@ -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; } -- 2.39.2