aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/info.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/info.el b/lisp/info.el
index a4042046845..aa036de6b26 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -51,7 +51,8 @@ in paths.el.")
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)
@@ -61,7 +62,10 @@ in paths.el.")
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.
66nil means not yet initialized. In this case, Info uses the environment 70nil means not yet initialized. In this case, Info uses the environment
67variable INFOPATH to initialize it, or `Info-default-directory-list' 71variable INFOPATH to initialize it, or `Info-default-directory-list'