X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/6716bfa4e5af380fe80ad8fb23be35af2eca06b9..db8d59365b5ccdca367ace2d4df5b8a2242e5765:/lisp/info.el diff --git a/lisp/info.el b/lisp/info.el index 163441893d..05c0722089 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -844,7 +844,7 @@ a case-insensitive match is tried." (goto-char (point-min)) (condition-case () (if (and (re-search-forward - "makeinfo version \\([0-9]+.[0-9]+\\)" + "makeinfo[ \n]version[ \n]\\([0-9]+.[0-9]+\\)" (line-beginning-position 3) t) (not (version< (match-string 1) "4.7"))) (setq found t)) @@ -2792,7 +2792,8 @@ Use the \\\\[Info-index-next] command to see the other matches. Give an empty topic name to go to the Index node itself." (interactive (list - (let ((Info-complete-menu-buffer (clone-buffer)) + (let ((completion-ignore-case t) + (Info-complete-menu-buffer (clone-buffer)) (Info-complete-nodes (Info-index-nodes)) (Info-history-list nil)) (if (equal Info-current-file "dir") @@ -2866,8 +2867,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) @@ -2907,11 +2911,20 @@ 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) (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 @@ -3065,7 +3078,8 @@ If FORK is a string, it is the name to use for the new buffer." ;; Common subroutine. (defun Info-try-follow-nearest-node (&optional fork) - "Follow a node reference near point. Return non-nil if successful." + "Follow a node reference near point. Return non-nil if successful. +If FORK is non-nil, it i spassed to `Info-goto-node'." (let (node) (cond ((Info-get-token (point) "[hf]t?tp://" "[hf]t?tp://\\([^ \t\n\"`({<>})']+\\)") @@ -3792,6 +3806,8 @@ the variable `Info-file-list-for-emacs'." (setq other-tag (cond ((save-match-data (looking-back "\\