]> git.eshelyaron.com Git - emacs.git/commitdiff
(info-apropos): Speed up by using add-to-list instead of manual consing.
authorEli Zaretskii <eliz@gnu.org>
Sat, 20 May 2006 20:16:59 +0000 (20:16 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 20 May 2006 20:16:59 +0000 (20:16 +0000)
lisp/info.el

index d689556b321e45e5c51d940b9ac5791c89bd63f5..2737999b0900ce97edb954369b687018fccf6f78 100644 (file)
@@ -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