1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-27 10:54:40 +00:00

(Info-index): Get immediate error if used in `dir'.

This commit is contained in:
Richard M. Stallman 2002-07-01 07:48:12 +00:00
parent 4855897e98
commit aebd1760c0

View File

@ -1854,11 +1854,15 @@ Give a blank topic name to go to the Index node itself."
(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]*\\)"