From: Eli Zaretskii Date: Sat, 14 Jan 2012 18:16:28 +0000 (+0200) Subject: Allow visiting Info files with no "Up" pointer, such as DIR files. X-Git-Tag: emacs-pretest-24.0.93~97^2~17^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=688070a52955c1046a3b2a373956725926703c9d;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b90a40a17ae..76728fdbc5b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-01-14 Eli Zaretskii + + * 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 * startup.el (command-line): Fix X resource class for cursorColor. 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)