]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow visiting Info files with no "Up" pointer, such as DIR files.
authorEli Zaretskii <eliz@gnu.org>
Sat, 14 Jan 2012 18:16:28 +0000 (20:16 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 14 Jan 2012 18:16:28 +0000 (20:16 +0200)
 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.

lisp/ChangeLog
lisp/info.el

index b90a40a17ae1f5331d306607a3c074f6985ff7a3..76728fdbc5b9d73f76ba87836ca271dfc9aff919 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-14  Eli Zaretskii  <eliz@gnu.org>
+
+       * info.el (Info-toc-build): If the Info file has no "Up" pointer,
+       don't pass the (nil) value of `upnode' to string-match.
+
 2012-01-14  Chong Yidong  <cyd@gnu.org>
 
        * startup.el (command-line): Fix X resource class for cursorColor.
index 94d295189956b6c3f5082ae5753f78819eea6ff9..a8cb141114c26879de56a00d9fe860f0d35cfad3 100644 (file)
@@ -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)