changeset 46104:ee6975afddef

(Info-index): Get immediate error if used in `dir'.
author Richard M. Stallman <rms@gnu.org>
date Mon, 01 Jul 2002 07:48:12 +0000
parents 4bea2ef4c58a
children a6851d9363cd
files lisp/info.el
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Mon Jul 01 07:47:22 2002 +0000
+++ b/lisp/info.el	Mon Jul 01 07:48:12 2002 +0000
@@ -1854,11 +1854,15 @@
    (list
     (let ((Info-complete-menu-buffer (clone-buffer))
 	  (Info-complete-next-re "\\<Index\\>"))
+      (if (equal Info-current-file "dir")
+	  (error "The Info directory node has no index; use m to select a manual"))
       (unwind-protect
 	  (with-current-buffer Info-complete-menu-buffer
 	    (Info-goto-index)
 	    (completing-read "Index topic: " 'Info-complete-menu-item))
 	(kill-buffer Info-complete-menu-buffer)))))
+  (if (equal Info-current-file "dir")
+      (error "The Info directory node has no index; use m to select a manual"))
   (let ((orignode Info-current-node)
 	(rnode nil)
 	(pattern (format "\n\\* +\\([^\n:]*%s[^\n:]*\\):[ \t]*\\([^.\n]*\\)\\.[ \t]*\\([0-9]*\\)"