diff options
| author | Eli Zaretskii | 2006-05-20 20:16:59 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-05-20 20:16:59 +0000 |
| commit | 9ef5b4323ddb322bf6e56acb55092abc244913af (patch) | |
| tree | c144ce24430f2fe01e3b0e9688a78f784b0fc279 | |
| parent | 59ad6ae53bdf29758c98f7ce3b2c7138182767c5 (diff) | |
| download | emacs-9ef5b4323ddb322bf6e56acb55092abc244913af.tar.gz emacs-9ef5b4323ddb322bf6e56acb55092abc244913af.zip | |
(info-apropos): Speed up by using add-to-list instead of manual consing.
| -rw-r--r-- | lisp/info.el | 4 |
1 files changed, 3 insertions, 1 deletions
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." | |||
| 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 |