diff options
| author | Chong Yidong | 2008-11-08 16:55:23 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-11-08 16:55:23 +0000 |
| commit | cc524e3b21048028222d305d3a8e34ab89da9b3e (patch) | |
| tree | c061d3a29fafd10a78e3e064dfc28e01246412b7 /src | |
| parent | be70e183485c2f305403848fd914a74ffa4fa5c1 (diff) | |
| download | emacs-cc524e3b21048028222d305d3a8e34ab89da9b3e.tar.gz emacs-cc524e3b21048028222d305d3a8e34ab89da9b3e.zip | |
(file_name_completion): If completion_ignore_case is enabled, ignore
case when checking completion-regexp-list.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dired.c | 19 |
1 files 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) | |||
| 631 | XSETFASTINT (zero, 0); | 631 | XSETFASTINT (zero, 0); |
| 632 | 632 | ||
| 633 | /* Ignore this element if it fails to match all the regexps. */ | 633 | /* Ignore this element if it fails to match all the regexps. */ |
| 634 | for (regexps = Vcompletion_regexp_list; CONSP (regexps); | 634 | if (completion_ignore_case) |
| 635 | regexps = XCDR (regexps)) | 635 | { |
| 636 | if (fast_string_match (XCAR (regexps), name) < 0) | 636 | for (regexps = Vcompletion_regexp_list; CONSP (regexps); |
| 637 | break; | 637 | regexps = XCDR (regexps)) |
| 638 | if (fast_string_match_ignore_case (XCAR (regexps), name) < 0) | ||
| 639 | break; | ||
| 640 | } | ||
| 641 | else | ||
| 642 | { | ||
| 643 | for (regexps = Vcompletion_regexp_list; CONSP (regexps); | ||
| 644 | regexps = XCDR (regexps)) | ||
| 645 | if (fast_string_match (XCAR (regexps), name) < 0) | ||
| 646 | break; | ||
| 647 | } | ||
| 648 | |||
| 638 | if (CONSP (regexps)) | 649 | if (CONSP (regexps)) |
| 639 | continue; | 650 | continue; |
| 640 | } | 651 | } |