Mercurial > hg > xemacs-beta
diff lisp/minibuf.el @ 4720:3c92890f3750
Add `file-system-ignore-case-p', use it.
2009-10-24 Aidan Kehoe <kehoea@parhasard.net>
* files.el (default-file-system-ignore-case): New variable.
(file-system-case-alist): New variable.
(file-system-ignore-case-p):
New function; return t if file names under PATH should be treated
case-insensitively.
* minibuf.el (read-file-name-1, read-file-name-internal-1)
(read-file-name-internal-1):
* package-admin.el (package-admin-check-manifest):
Use file-system-ignore-case-p instead of checking system-type
directly in these functions. (Even though minibuf.el is dumped
before files.el, the function is only called in interactive usage,
there's no dump time order dependency here.)
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 24 Oct 2009 15:33:23 +0100 |
parents | 9a1a59b4b75d |
children | 74a5eaa67982 |
line wrap: on
line diff
--- a/lisp/minibuf.el Mon Oct 19 12:47:21 2009 +0100 +++ b/lisp/minibuf.el Sat Oct 24 15:33:23 2009 +0100 @@ -1698,9 +1698,7 @@ (add-one-shot-hook 'minibuffer-setup-hook (lambda () - ;; #### SCREAM! Create a `file-system-ignore-case' - ;; function, so this kind of stuff is generalized! - (and (eq system-type 'windows-nt) + (and (file-system-ignore-case-p (or dir default-directory)) (set (make-local-variable 'completion-ignore-case) t)) (set (make-local-variable @@ -1777,6 +1775,8 @@ string)) ;; Not doing environment-variable completion hack (let* ((orig (if (equal string "") nil string)) + (completion-ignore-case (file-system-ignore-case-p + (or dir default-directory))) (sstring (if orig (substitute-in-file-name string) string)) (specdir (if orig (file-name-directory sstring) nil)) (name (if orig (file-name-nondirectory sstring) string)) @@ -1814,6 +1814,8 @@ name))) ;; An odd number of trailing $'s (let* ((start (match-beginning 3)) + (completion-ignore-case (file-system-ignore-case-p + (or dir default-directory))) (env (substring string (cond ((= start (length string)) ;; "...$"