From eb7afdaddc286b57253cf0cd643b2ea594fb130c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 26 May 2012 14:23:28 -0700 Subject: Don't mess with INFOPATH in ns builds It's not necessary, and would break if INFOPATH was already set (bug#2791). Ref also http://lists.gnu.org/archive/html/emacs-devel/2009-05/msg00035.html http://lists.gnu.org/archive/html/emacs-devel/2005-06/msg00064.html * lisp/paths.el (Info-default-directory-list): * lisp/info.el (info-initialize): For self-contained NS builds, put the included info/ directory at the front. * src/nsterm.m (ns_init_paths): Don't mess with INFOPATH. --- lisp/info.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lisp/info.el') 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) -- cgit v1.2.1