diff options
author | Kim F. Storm <storm@cua.dk> | 2005-08-21 21:26:07 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2005-08-21 21:26:07 +0000 |
commit | d6049c7884ed4b2f3cede0d8ae52c2f7a8be7654 (patch) | |
tree | 1927104e1e6cf6da753c5b13016fa784ac9fefd2 | |
parent | 61d6a05830dfbf4d3ea0d811560ccdaa56459786 (diff) | |
download | emacs-d6049c7884ed4b2f3cede0d8ae52c2f7a8be7654.tar.gz |
(ido-ignore-item-p): Use save-match-data.
Bind case-fold-search to ido-case-fold locally.
-rw-r--r-- | lisp/ido.el | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index aca5e7e6d72..2ea7476ce45 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3366,38 +3366,37 @@ for first matching file." (or (member name ido-ignore-item-temp-list) (and ido-process-ignore-lists re-list - (let ((data (match-data)) - (ext-list (and ignore-ext ido-ignore-extensions + (save-match-data + (let ((ext-list (and ignore-ext ido-ignore-extensions completion-ignored-extensions)) - ignorep nextstr - (flen (length name)) slen) - (while ext-list - (setq nextstr (car ext-list)) - (if (cond - ((stringp nextstr) - (and (>= flen (setq slen (length nextstr))) - (string-equal (substring name (- flen slen)) nextstr))) - ((fboundp nextstr) (funcall nextstr name)) - (t nil)) - (setq ignorep t - ext-list nil - re-list nil) - (setq ext-list (cdr ext-list)))) - (while re-list - (setq nextstr (car re-list)) - (if (cond - ((stringp nextstr) (string-match nextstr name)) - ((fboundp nextstr) (funcall nextstr name)) - (t nil)) - (setq ignorep t - re-list nil) - (setq re-list (cdr re-list)))) - ;; return the result - (if ignorep - (setq ido-ignored-list (cons name ido-ignored-list))) - (set-match-data data) - ignorep)))) - + (case-fold-search ido-case-fold) + ignorep nextstr + (flen (length name)) slen) + (while ext-list + (setq nextstr (car ext-list)) + (if (cond + ((stringp nextstr) + (and (>= flen (setq slen (length nextstr))) + (string-equal (substring name (- flen slen)) nextstr))) + ((fboundp nextstr) (funcall nextstr name)) + (t nil)) + (setq ignorep t + ext-list nil + re-list nil) + (setq ext-list (cdr ext-list)))) + (while re-list + (setq nextstr (car re-list)) + (if (cond + ((stringp nextstr) (string-match nextstr name)) + ((fboundp nextstr) (funcall nextstr name)) + (t nil)) + (setq ignorep t + re-list nil) + (setq re-list (cdr re-list)))) + ;; return the result + (if ignorep + (setq ido-ignored-list (cons name ido-ignored-list))) + ignorep))))) ;; Private variable used by `ido-word-matching-substring'. (defvar ido-change-word-sub) |