diff options
| author | Glenn Morris | 2012-05-26 14:23:28 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-05-26 14:23:28 -0700 |
| commit | eb7afdaddc286b57253cf0cd643b2ea594fb130c (patch) | |
| tree | e8ad9cb021a21127b91467e8a7057027978ca4ce | |
| parent | 04188bb9ad26b7e79625571fbef39b304449496a (diff) | |
| download | emacs-eb7afdaddc286b57253cf0cd643b2ea594fb130c.tar.gz emacs-eb7afdaddc286b57253cf0cd643b2ea594fb130c.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/info.el | 14 | ||||
| -rw-r--r-- | lisp/paths.el | 7 | ||||
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/nsterm.m | 10 |
5 files changed, 27 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 48cc0ca22ae..918048ce62f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2012-05-26 Glenn Morris <rgm@gnu.org> | 1 | 2012-05-26 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * paths.el (Info-default-directory-list): | ||
| 4 | * info.el (info-initialize): For self-contained NS builds, put the | ||
| 5 | included info/ directory at the front. (Bug#2791) | ||
| 6 | |||
| 3 | * paths.el (Info-default-directory-list): Make it a defcustom, | 7 | * paths.el (Info-default-directory-list): Make it a defcustom, |
| 4 | mainly so that we can use custom-initialize-delay. | 8 | mainly so that we can use custom-initialize-delay. |
| 5 | 9 | ||
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'." | |||
| 618 | (append (split-string (substring path 0 -1) sep) | 618 | (append (split-string (substring path 0 -1) sep) |
| 619 | (Info-default-dirs)) | 619 | (Info-default-dirs)) |
| 620 | (split-string path sep)) | 620 | (split-string path sep)) |
| 621 | (Info-default-dirs))))))) | 621 | (Info-default-dirs)))) |
| 622 | ;; For a self-contained (ie relocatable) NS build, AFAICS we | ||
| 623 | ;; always want the included info directory to be at the head of | ||
| 624 | ;; the search path, unless it's already in INFOPATH somewhere. | ||
| 625 | ;; It's at the head of Info-default-directory-list, | ||
| 626 | ;; but there's no way to get it at the head of Info-directory-list | ||
| 627 | ;; except by doing it here. | ||
| 628 | (and path | ||
| 629 | (featurep 'ns) | ||
| 630 | (let ((dir (expand-file-name "../info" data-directory))) | ||
| 631 | (and (file-directory-p dir) | ||
| 632 | (not (member dir (split-string path ":" t))) | ||
| 633 | (push dir Info-directory-list))))))) | ||
| 622 | 634 | ||
| 623 | ;;;###autoload | 635 | ;;;###autoload |
| 624 | (defun info-other-window (&optional file-or-node) | 636 | (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 @@ | |||
| 37 | ;; call custom-initialize-delay on it. | 37 | ;; call custom-initialize-delay on it. |
| 38 | (defcustom Info-default-directory-list | 38 | (defcustom Info-default-directory-list |
| 39 | (let* ((config-dir | 39 | (let* ((config-dir |
| 40 | (file-name-as-directory configure-info-directory)) | 40 | (file-name-as-directory |
| 41 | ;; Self-contained NS build with info/ in the app-bundle. | ||
| 42 | (or (and (featurep 'ns) | ||
| 43 | (let ((dir (expand-file-name "../info" data-directory))) | ||
| 44 | (if (file-directory-p dir) dir))) | ||
| 45 | configure-info-directory))) | ||
| 41 | (prefixes | 46 | (prefixes |
| 42 | ;; Directory trees in which to look for info subdirectories | 47 | ;; Directory trees in which to look for info subdirectories |
| 43 | (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) | 48 | (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) |
diff --git a/src/ChangeLog b/src/ChangeLog index c71ea45dded..bea9b4fbc47 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-05-26 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791) | ||
| 4 | |||
| 1 | 2012-05-26 Eli Zaretskii <eliz@gnu.org> | 5 | 2012-05-26 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | Extend mouse support on W32 text-mode console. | 7 | Extend mouse support on W32 text-mode console. |
diff --git a/src/nsterm.m b/src/nsterm.m index 4b8b2bb4820..8bd2bb283b2 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -379,16 +379,6 @@ ns_init_paths (void) | |||
| 379 | setenv ("EMACSDOC", [resourcePath UTF8String], 1); | 379 | setenv ("EMACSDOC", [resourcePath UTF8String], 1); |
| 380 | } | 380 | } |
| 381 | } | 381 | } |
| 382 | |||
| 383 | if (!getenv ("INFOPATH")) | ||
| 384 | { | ||
| 385 | resourcePath = [resourceDir stringByAppendingPathComponent: @"info"]; | ||
| 386 | if ([fileManager fileExistsAtPath: resourcePath isDirectory: &isDir]) | ||
| 387 | if (isDir) | ||
| 388 | setenv ("INFOPATH", [[resourcePath stringByAppendingString: @":"] | ||
| 389 | UTF8String], 1); | ||
| 390 | /* Note, extra colon needed to cause merge w/later user additions. */ | ||
| 391 | } | ||
| 392 | } | 382 | } |
| 393 | 383 | ||
| 394 | 384 | ||