summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/info.el14
-rw-r--r--lisp/paths.el7
3 files changed, 23 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 48cc0ca22ae..918048ce62f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
2012-05-26 Glenn Morris <rgm@gnu.org>
+ * paths.el (Info-default-directory-list):
+ * info.el (info-initialize): For self-contained NS builds, put the
+ included info/ directory at the front. (Bug#2791)
+
* paths.el (Info-default-directory-list): Make it a defcustom,
mainly so that we can use custom-initialize-delay.
diff --git a/lisp/info.el b/lisp/info.el
index 367d9d0a9ef..93523c4c16f 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -618,7 +618,19 @@ in `Info-file-supports-index-cookies-list'."
(append (split-string (substring path 0 -1) sep)
(Info-default-dirs))
(split-string path sep))
- (Info-default-dirs)))))))
+ (Info-default-dirs))))
+ ;; For a self-contained (ie relocatable) NS build, AFAICS we
+ ;; always want the included info directory to be at the head of
+ ;; the search path, unless it's already in INFOPATH somewhere.
+ ;; It's at the head of Info-default-directory-list,
+ ;; but there's no way to get it at the head of Info-directory-list
+ ;; except by doing it here.
+ (and path
+ (featurep 'ns)
+ (let ((dir (expand-file-name "../info" data-directory)))
+ (and (file-directory-p dir)
+ (not (member dir (split-string path ":" t)))
+ (push dir Info-directory-list)))))))
;;;###autoload
(defun info-other-window (&optional file-or-node)
diff --git a/lisp/paths.el b/lisp/paths.el
index 4d7e3718be2..a0d5cc7775d 100644
--- a/lisp/paths.el
+++ b/lisp/paths.el
@@ -37,7 +37,12 @@
;; call custom-initialize-delay on it.
(defcustom Info-default-directory-list
(let* ((config-dir
- (file-name-as-directory configure-info-directory))
+ (file-name-as-directory
+ ;; Self-contained NS build with info/ in the app-bundle.
+ (or (and (featurep 'ns)
+ (let ((dir (expand-file-name "../info" data-directory)))
+ (if (file-directory-p dir) dir)))
+ configure-info-directory)))
(prefixes
;; Directory trees in which to look for info subdirectories
(prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/")))