# HG changeset patch # User Eli Zaretskii # Date 1148156219 0 # Node ID e8009af8c1e1abe26d2b2c625b8bf602da2bbe82 # Parent 3495dd448af904ad1df175285eaf375c0b4f9502 (info-apropos): Speed up by using add-to-list instead of manual consing. diff -r 3495dd448af9 -r e8009af8c1e1 lisp/info.el --- a/lisp/info.el Sat May 20 20:07:20 2006 +0000 +++ b/lisp/info.el Sat May 20 20:16:59 2006 +0000 @@ -2918,7 +2918,9 @@ (goto-char (point-min)) (re-search-forward "\\* Menu: *\n" nil t) (while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t) - (setq manuals (cons (match-string 1) manuals))) + ;; add-to-list makes sure we don't have duplicates in `manuals', + ;; so that the following dolist loop runs faster. + (add-to-list 'manuals (match-string 1))) (dolist (manual (nreverse manuals)) (message "Searching %s" manual) (condition-case err