From: Eli Zaretskii Date: Sat, 20 May 2006 20:16:59 +0000 (+0000) Subject: (info-apropos): Speed up by using add-to-list instead of manual consing. X-Git-Tag: emacs-pretest-22.0.90~2447 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9ef5b4323ddb322bf6e56acb55092abc244913af;p=emacs.git (info-apropos): Speed up by using add-to-list instead of manual consing. --- diff --git a/lisp/info.el b/lisp/info.el index d689556b321..2737999b090 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2918,7 +2918,9 @@ Build a menu of the possible matches." (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