summaryrefslogtreecommitdiff
path: root/lisp/info.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2006-05-20 20:07:20 +0000
committerEli Zaretskii <eliz@gnu.org>2006-05-20 20:07:20 +0000
commit59ad6ae53bdf29758c98f7ce3b2c7138182767c5 (patch)
tree1ef73e7f28aff7861e12a6d645f93b4209cb1770 /lisp/info.el
parentc7292dcbba2967e171ab97895655a6dc96b6e32b (diff)
downloademacs-59ad6ae53bdf29758c98f7ce3b2c7138182767c5.tar.gz
(info-apropos): Make sure current-file and current-node have non-nil values.
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el7
1 files changed, 7 insertions, 0 deletions
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)