From 59ad6ae53bdf29758c98f7ce3b2c7138182767c5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 20 May 2006 20:07:20 +0000 Subject: (info-apropos): Make sure current-file and current-node have non-nil values. --- lisp/info.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lisp/info.el') diff --git a/lisp/info.el b/lisp/info.el index 163441893db..d689556b321 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2907,6 +2907,13 @@ Build a menu of the possible matches." manuals matches node nodes) (let ((Info-fontify-maximum-menu-size nil)) (Info-directory) + ;; current-node and current-file are nil when they invoke info-apropos + ;; as the first Info command, i.e. info-apropos loads info.el. In that + ;; case, we use (DIR)Top instead, to avoid signalling an error after + ;; the search is complete. + (when (null current-node) + (setq current-file Info-current-file) + (setq current-node Info-current-node)) (message "Searching indices...") (goto-char (point-min)) (re-search-forward "\\* Menu: *\n" nil t) -- cgit v1.2.1 From 9ef5b4323ddb322bf6e56acb55092abc244913af Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 20 May 2006 20:16:59 +0000 Subject: (info-apropos): Speed up by using add-to-list instead of manual consing. --- lisp/info.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp/info.el') 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." (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 -- cgit v1.2.1 From fa62821e21aae313dc611f1695c360f47bd31e25 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 20:09:58 +0000 Subject: (Info-index-next): Use where-is-internal to report actual binding of Info-index-next, rather than hard-coded `,'. --- lisp/info.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lisp/info.el') diff --git a/lisp/info.el b/lisp/info.el index 2737999b090..2669b709316 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." (car (car Info-index-alternatives)) (nth 2 (car Info-index-alternatives)) (if (cdr Info-index-alternatives) - (format "(%s total; use `,' for next)" - (length Info-index-alternatives)) + (format "(%s total; use `%s' for next)" + (length Info-index-alternatives) + (key-description (where-is-internal + 'Info-index-next overriding-local-map + t))) "(Only match)"))) (defun Info-find-index-name (name) -- cgit v1.2.1