comparison 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
comparison
equal deleted inserted replaced
70790:3495dd448af9 70791:e8009af8c1e1
2916 (setq current-node Info-current-node)) 2916 (setq current-node Info-current-node))
2917 (message "Searching indices...") 2917 (message "Searching indices...")
2918 (goto-char (point-min)) 2918 (goto-char (point-min))
2919 (re-search-forward "\\* Menu: *\n" nil t) 2919 (re-search-forward "\\* Menu: *\n" nil t)
2920 (while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t) 2920 (while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t)
2921 (setq manuals (cons (match-string 1) manuals))) 2921 ;; add-to-list makes sure we don't have duplicates in `manuals',
2922 ;; so that the following dolist loop runs faster.
2923 (add-to-list 'manuals (match-string 1)))
2922 (dolist (manual (nreverse manuals)) 2924 (dolist (manual (nreverse manuals))
2923 (message "Searching %s" manual) 2925 (message "Searching %s" manual)
2924 (condition-case err 2926 (condition-case err
2925 (if (setq nodes (Info-index-nodes (Info-find-file manual))) 2927 (if (setq nodes (Info-index-nodes (Info-find-file manual)))
2926 (save-excursion 2928 (save-excursion