summaryrefslogtreecommitdiff
path: root/lisp/info.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-01-14 20:16:28 +0200
committerEli Zaretskii <eliz@gnu.org>2012-01-14 20:16:28 +0200
commit688070a52955c1046a3b2a373956725926703c9d (patch)
tree6433d1e2e9511b244a0b644ca350d65cd6a68090 /lisp/info.el
parent0702107ab990bc55b55f6d78306996baed3ad4ad (diff)
downloademacs-688070a52955c1046a3b2a373956725926703c9d.tar.gz
Allow visiting Info files with no "Up" pointer, such as DIR files.
lisp/info.el (Info-toc-build): If the Info file has no "Up" pointer, don't pass the (nil) value of `upnode' to string-match.
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 94d29518995..a8cb141114c 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2251,7 +2251,7 @@ Table of contents is created from the tree structure of menus."
(match-string-no-properties 1)))
(section "Top")
menu-items)
- (when (string-match "(" upnode) (setq upnode nil))
+ (when (and upnode (string-match "(" upnode)) (setq upnode nil))
(when (and (not (Info-index-node nodename file))
(re-search-forward "^\\* Menu:" bound t))
(forward-line 1)