changeset 70789:ab54c05cde25

(info-apropos): Make sure current-file and current-node have non-nil values.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 20 May 2006 20:06:45 +0000
parents 49881f932176
children 3495dd448af9
files lisp/info.el
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Sat May 20 19:40:53 2006 +0000
+++ b/lisp/info.el	Sat May 20 20:06:45 2006 +0000
@@ -2907,6 +2907,13 @@
 	  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)