Mercurial > emacs
comparison lisp/msb.el @ 25281:26430a2408d5
(msb--choose-file-menu): Use `completion-ignore-case' in name
comparisons.
author | Dave Love <fx@gnu.org> |
---|---|
date | Mon, 16 Aug 1999 11:29:58 +0000 |
parents | cbe304a26771 |
children | 4a7a0fc36977 |
comparison
equal
deleted
inserted
replaced
25280:9b601931b795 | 25281:26430a2408d5 |
---|---|
595 ;; Clump together the "rest"-buffers that have a path that is | 595 ;; Clump together the "rest"-buffers that have a path that is |
596 ;; a subpath of the current one. | 596 ;; a subpath of the current one. |
597 (while (and tmp-rest | 597 (while (and tmp-rest |
598 (<= (length buffers) max-clumped-together) | 598 (<= (length buffers) max-clumped-together) |
599 (>= (length (car item)) (length path)) | 599 (>= (length (car item)) (length path)) |
600 ;; `completion-ignore-case' seems to default to t | |
601 ;; on the systems with case-insensitive file names. | |
600 (eq t (compare-strings path 0 nil | 602 (eq t (compare-strings path 0 nil |
601 (car item) 0 (length path)))) | 603 (car item) 0 (length path) |
604 completion-ignore-case))) | |
602 (setq found-p t) | 605 (setq found-p t) |
603 (setq buffers (append buffers (cdr item))) ;nconc is faster than append | 606 (setq buffers (append buffers (cdr item))) ;nconc is faster than append |
604 (setq tmp-rest (cdr tmp-rest) | 607 (setq tmp-rest (cdr tmp-rest) |
605 item (car tmp-rest))) | 608 item (car tmp-rest))) |
606 (cond | 609 (cond |
634 buffers (cdr first)) | 637 buffers (cdr first)) |
635 (if (equal old-path path) | 638 (if (equal old-path path) |
636 (setq last-path path)) | 639 (setq last-path path)) |
637 (when (and last-path | 640 (when (and last-path |
638 (or (and (>= (length path) (length last-path)) | 641 (or (and (>= (length path) (length last-path)) |
639 (eq t (compare-strings last-path 0 nil | 642 (eq t (compare-strings |
640 path 0 (length | 643 last-path 0 nil path 0 |
641 last-path)))) | 644 (length last-path) |
645 completion-ignore-case))) | |
642 (and (< (length path) (length last-path)) | 646 (and (< (length path) (length last-path)) |
643 (eq t (compare-strings path 0 nil | 647 (eq t (compare-strings |
644 last-path 0 (length | 648 path 0 nil last-path 0 (length path) |
645 path)))))) | 649 completion-ignore-case))))) |
646 ;; We have reached the same place in the file hierarchy as | 650 ;; We have reached the same place in the file hierarchy as |
647 ;; the last result, so we should quit at this point and | 651 ;; the last result, so we should quit at this point and |
648 ;; take what we have as result. | 652 ;; take what we have as result. |
649 (push (cons (msb--format-title top-found-p | 653 (push (cons (msb--format-title top-found-p |
650 (car first) | 654 (car first) |