]> git.eshelyaron.com Git - emacs.git/commitdiff
Catch more cases in info--ensure-not-in-directory-node
authorStefan Kangas <stefankangas@gmail.com>
Mon, 28 Nov 2022 00:32:01 +0000 (01:32 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Mon, 28 Nov 2022 00:32:01 +0000 (01:32 +0100)
* lisp/info.el (info--ensure-not-in-directory-node): Fix the case
where "DIR" is in upper-case, and if 'Info-current-file' is an
absolute file name.
Problem reported by Eli Zaretskii <eliz@gnu.org>.

lisp/info.el

index 7d44a1cec1dc3f79adee189db4fd2b1f4fa3ffad..05ad27e1801379cc3a09469b33f134a9dae91113 100644 (file)
@@ -3330,7 +3330,8 @@ If FILE is nil, check the current Info file."
     (Info-goto-node node)))
 
 (defun info--ensure-not-in-directory-node ()
-  (if (equal Info-current-file "dir")
+  (if (equal (downcase (file-name-nondirectory Info-current-file))
+             "dir")
       (error (substitute-command-keys
               (concat "The Info directory node has no index; "
                       "type \\[Info-menu] to select a manual")))))