diff lisp/info.el @ 83527:c44562301a11

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-289 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-290 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-291 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-292 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-293 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-567
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 24 May 2006 09:13:31 +0000
parents e8009af8c1e1
children 4477a2e46659
line wrap: on
line diff
--- a/lisp/info.el	Sat May 20 17:30:48 2006 +0000
+++ b/lisp/info.el	Wed May 24 09:13:31 2006 +0000
@@ -2907,11 +2907,20 @@
 	  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