comparison lisp/info.el @ 5482:27603dcb6260

(Info-directory-list): Change last elt to ../info (expanded).
author Richard M. Stallman <rms@gnu.org>
date Fri, 07 Jan 1994 11:58:27 +0000
parents c415cc48a084
children 38f8bfd91cca
comparison
equal deleted inserted replaced
5481:b88ee4b9c81e 5482:27603dcb6260
49 49
50 (defvar Info-fontify t 50 (defvar Info-fontify t
51 "*Non-nil enables highlighting and fonts in Info nodes.") 51 "*Non-nil enables highlighting and fonts in Info nodes.")
52 52
53 (defvar Info-directory-list 53 (defvar Info-directory-list
54 (let ((path (getenv "INFOPATH"))) 54 (let ((path (getenv "INFOPATH"))
55 (sibling (expand-file-name "../info/" (invocation-directory))))
55 (if path 56 (if path
56 (let ((list nil) 57 (let ((list nil)
57 idx) 58 idx)
58 (while (> (length path) 0) 59 (while (> (length path) 0)
59 (setq idx (or (string-match ":" path) (length path)) 60 (setq idx (or (string-match ":" path) (length path))
60 list (cons (substring path 0 idx) list) 61 list (cons (substring path 0 idx) list)
61 path (substring path (min (1+ idx) 62 path (substring path (min (1+ idx)
62 (length path))))) 63 (length path)))))
63 (nreverse list)) 64 (nreverse list))
64 Info-default-directory-list)) 65 (if (or (member sibling Info-default-directory-list)
66 (not (file-exists-p sibling)))
67 Info-default-directory-list
68 (reverse (cons sibling (cdr (reverse Info-default-directory-list)))))))
65 "List of directories to search for Info documentation files. 69 "List of directories to search for Info documentation files.
66 nil means not yet initialized. In this case, Info uses the environment 70 nil means not yet initialized. In this case, Info uses the environment
67 variable INFOPATH to initialize it, or `Info-default-directory-list' 71 variable INFOPATH to initialize it, or `Info-default-directory-list'
68 if there is no INFOPATH variable in the environment.") 72 if there is no INFOPATH variable in the environment.")
69 73