Mercurial > emacs
diff lisp/info.el @ 70791:e8009af8c1e1
(info-apropos): Speed up by using add-to-list instead of manual consing.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 20 May 2006 20:16:59 +0000 |
parents | ab54c05cde25 |
children | 4477a2e46659 |
line wrap: on
line diff
--- 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