From: Thien-Thi Nguyen Date: Mon, 8 Aug 2005 00:20:19 +0000 (+0000) Subject: (Info-dir-remove-duplicates): Avoid case folding in loop; X-Git-Tag: emacs-pretest-22.0.90~7753 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b499789ca4bc09fc61a6746cb15193a6378f231d;p=emacs.git (Info-dir-remove-duplicates): Avoid case folding in loop; instead, keep downcased strings for comparison. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c70ccb0d7ff..6347844b6ad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-08-08 Thien-Thi Nguyen + + * info.el (Info-dir-remove-duplicates): Avoid case folding + in loop; instead, keep downcased strings for comparison. + Suggested by Helmut Eller. + 2005-08-07 Michael Albinus Sync with Tramp 2.0.50. diff --git a/lisp/info.el b/lisp/info.el index 78a9e8a08a2..b97ad624d2d 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1157,8 +1157,9 @@ a case-insensitive match is tried." (goto-char start) (while (re-search-forward "^* \\([^:\n]+:\\(:\\|[^.\n]+\\).\\)" limit 'move) - (let ((x (match-string 1))) - (if (member-ignore-case x seen) + ;; Fold case straight away; `member-ignore-case' here wasteful. + (let ((x (downcase (match-string 1)))) + (if (member x seen) (delete-region (match-beginning 0) (progn (re-search-forward "^[^ \t]" nil t) (match-beginning 0)))