diff options
| author | Kim F. Storm | 2005-08-21 21:26:07 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-08-21 21:26:07 +0000 |
| commit | d6049c7884ed4b2f3cede0d8ae52c2f7a8be7654 (patch) | |
| tree | 1927104e1e6cf6da753c5b13016fa784ac9fefd2 | |
| parent | 61d6a05830dfbf4d3ea0d811560ccdaa56459786 (diff) | |
| download | emacs-d6049c7884ed4b2f3cede0d8ae52c2f7a8be7654.tar.gz emacs-d6049c7884ed4b2f3cede0d8ae52c2f7a8be7654.zip | |
(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." | |||
| 3366 | (or (member name ido-ignore-item-temp-list) | 3366 | (or (member name ido-ignore-item-temp-list) |
| 3367 | (and | 3367 | (and |
| 3368 | ido-process-ignore-lists re-list | 3368 | ido-process-ignore-lists re-list |
| 3369 | (let ((data (match-data)) | 3369 | (save-match-data |
| 3370 | (ext-list (and ignore-ext ido-ignore-extensions | 3370 | (let ((ext-list (and ignore-ext ido-ignore-extensions |
| 3371 | completion-ignored-extensions)) | 3371 | completion-ignored-extensions)) |
| 3372 | ignorep nextstr | 3372 | (case-fold-search ido-case-fold) |
| 3373 | (flen (length name)) slen) | 3373 | ignorep nextstr |
| 3374 | (while ext-list | 3374 | (flen (length name)) slen) |
| 3375 | (setq nextstr (car ext-list)) | 3375 | (while ext-list |
| 3376 | (if (cond | 3376 | (setq nextstr (car ext-list)) |
| 3377 | ((stringp nextstr) | 3377 | (if (cond |
| 3378 | (and (>= flen (setq slen (length nextstr))) | 3378 | ((stringp nextstr) |
| 3379 | (string-equal (substring name (- flen slen)) nextstr))) | 3379 | (and (>= flen (setq slen (length nextstr))) |
| 3380 | ((fboundp nextstr) (funcall nextstr name)) | 3380 | (string-equal (substring name (- flen slen)) nextstr))) |
| 3381 | (t nil)) | 3381 | ((fboundp nextstr) (funcall nextstr name)) |
| 3382 | (setq ignorep t | 3382 | (t nil)) |
| 3383 | ext-list nil | 3383 | (setq ignorep t |
| 3384 | re-list nil) | 3384 | ext-list nil |
| 3385 | (setq ext-list (cdr ext-list)))) | 3385 | re-list nil) |
| 3386 | (while re-list | 3386 | (setq ext-list (cdr ext-list)))) |
| 3387 | (setq nextstr (car re-list)) | 3387 | (while re-list |
| 3388 | (if (cond | 3388 | (setq nextstr (car re-list)) |
| 3389 | ((stringp nextstr) (string-match nextstr name)) | 3389 | (if (cond |
| 3390 | ((fboundp nextstr) (funcall nextstr name)) | 3390 | ((stringp nextstr) (string-match nextstr name)) |
| 3391 | (t nil)) | 3391 | ((fboundp nextstr) (funcall nextstr name)) |
| 3392 | (setq ignorep t | 3392 | (t nil)) |
| 3393 | re-list nil) | 3393 | (setq ignorep t |
| 3394 | (setq re-list (cdr re-list)))) | 3394 | re-list nil) |
| 3395 | ;; return the result | 3395 | (setq re-list (cdr re-list)))) |
| 3396 | (if ignorep | 3396 | ;; return the result |
| 3397 | (setq ido-ignored-list (cons name ido-ignored-list))) | 3397 | (if ignorep |
| 3398 | (set-match-data data) | 3398 | (setq ido-ignored-list (cons name ido-ignored-list))) |
| 3399 | ignorep)))) | 3399 | ignorep))))) |
| 3400 | |||
| 3401 | 3400 | ||
| 3402 | ;; Private variable used by `ido-word-matching-substring'. | 3401 | ;; Private variable used by `ido-word-matching-substring'. |
| 3403 | (defvar ido-change-word-sub) | 3402 | (defvar ido-change-word-sub) |