diff options
Diffstat (limited to 'lisp/info.el')
| -rw-r--r-- | lisp/info.el | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lisp/info.el b/lisp/info.el index d12b7a01866..107dbb72d95 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -2866,8 +2866,11 @@ Give an empty topic name to go to the Index node itself." | |||
| 2866 | (car (car Info-index-alternatives)) | 2866 | (car (car Info-index-alternatives)) |
| 2867 | (nth 2 (car Info-index-alternatives)) | 2867 | (nth 2 (car Info-index-alternatives)) |
| 2868 | (if (cdr Info-index-alternatives) | 2868 | (if (cdr Info-index-alternatives) |
| 2869 | (format "(%s total; use `,' for next)" | 2869 | (format "(%s total; use `%s' for next)" |
| 2870 | (length Info-index-alternatives)) | 2870 | (length Info-index-alternatives) |
| 2871 | (key-description (where-is-internal | ||
| 2872 | 'Info-index-next overriding-local-map | ||
| 2873 | t))) | ||
| 2871 | "(Only match)"))) | 2874 | "(Only match)"))) |
| 2872 | 2875 | ||
| 2873 | (defun Info-find-index-name (name) | 2876 | (defun Info-find-index-name (name) |
| @@ -2907,11 +2910,20 @@ Build a menu of the possible matches." | |||
| 2907 | manuals matches node nodes) | 2910 | manuals matches node nodes) |
| 2908 | (let ((Info-fontify-maximum-menu-size nil)) | 2911 | (let ((Info-fontify-maximum-menu-size nil)) |
| 2909 | (Info-directory) | 2912 | (Info-directory) |
| 2913 | ;; current-node and current-file are nil when they invoke info-apropos | ||
| 2914 | ;; as the first Info command, i.e. info-apropos loads info.el. In that | ||
| 2915 | ;; case, we use (DIR)Top instead, to avoid signalling an error after | ||
| 2916 | ;; the search is complete. | ||
| 2917 | (when (null current-node) | ||
| 2918 | (setq current-file Info-current-file) | ||
| 2919 | (setq current-node Info-current-node)) | ||
| 2910 | (message "Searching indices...") | 2920 | (message "Searching indices...") |
| 2911 | (goto-char (point-min)) | 2921 | (goto-char (point-min)) |
| 2912 | (re-search-forward "\\* Menu: *\n" nil t) | 2922 | (re-search-forward "\\* Menu: *\n" nil t) |
| 2913 | (while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t) | 2923 | (while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t) |
| 2914 | (setq manuals (cons (match-string 1) manuals))) | 2924 | ;; add-to-list makes sure we don't have duplicates in `manuals', |
| 2925 | ;; so that the following dolist loop runs faster. | ||
| 2926 | (add-to-list 'manuals (match-string 1))) | ||
| 2915 | (dolist (manual (nreverse manuals)) | 2927 | (dolist (manual (nreverse manuals)) |
| 2916 | (message "Searching %s" manual) | 2928 | (message "Searching %s" manual) |
| 2917 | (condition-case err | 2929 | (condition-case err |