comparison lisp/info.el @ 3330:4fd13e6109e3

(Info-mode-map): Correct Info-top to Info-top-node.
author Richard M. Stallman <rms@gnu.org>
date Sun, 30 May 1993 23:32:41 +0000
parents 34f2db3916fe
children 1795290d0fc8
comparison
equal deleted inserted replaced
3329:c9443f73d329 3330:4fd13e6109e3
45 (defvar Info-default-directory-list nil 45 (defvar Info-default-directory-list nil
46 "List of default directories to search for Info documentation files. 46 "List of default directories to search for Info documentation files.
47 This value is used as the default for `Info-directory-list'. It is set 47 This value is used as the default for `Info-directory-list'. It is set
48 in paths.el.") 48 in paths.el.")
49 49
50 (defvar Info-directory-list nil 50 (defvar Info-directory-list
51 (let ((path (getenv "INFOPATH")))
52 (if path
53 (let ((list nil)
54 idx)
55 (while (> (length path) 0)
56 (setq idx (or (string-match ":" path) (length path))
57 list (cons (substring path 0 idx) list)
58 path (substring path (min (1+ idx)
59 (length path)))))
60 (nreverse list))
61 Info-default-directory-list))
51 "List of directories to search for Info documentation files. 62 "List of directories to search for Info documentation files.
52 nil means not yet initialized. In this case, Info uses the environment 63 nil means not yet initialized. In this case, Info uses the environment
53 variable INFOPATH to initialize it, or `Info-default-directory-list' 64 variable INFOPATH to initialize it, or `Info-default-directory-list'
54 if there is no INFOPATH variable in the environment.") 65 if there is no INFOPATH variable in the environment.")
55 66
110 121
111 In interactive use, a prefix argument directs this command 122 In interactive use, a prefix argument directs this command
112 to read a file name from the minibuffer." 123 to read a file name from the minibuffer."
113 (interactive (if current-prefix-arg 124 (interactive (if current-prefix-arg
114 (list (read-file-name "Info file name: " nil nil t)))) 125 (list (read-file-name "Info file name: " nil nil t))))
115 (or Info-directory-list
116 (setq Info-directory-list
117 (let ((path (getenv "INFOPATH")))
118 (if path
119 (let ((list nil)
120 idx)
121 (while (> (length path) 0)
122 (setq idx (or (string-match ":" path) (length path))
123 list (cons (substring path 0 idx) list)
124 path (substring path (min (1+ idx)
125 (length path)))))
126 (nreverse list))
127 Info-default-directory-list))))
128 (if file 126 (if file
129 (Info-goto-node (concat "(" file ")")) 127 (Info-goto-node (concat "(" file ")"))
130 (if (get-buffer "*info*") 128 (if (get-buffer "*info*")
131 (switch-to-buffer "*info*") 129 (switch-to-buffer "*info*")
132 (Info-directory)))) 130 (Info-directory))))