Created
June 21, 2012 15:42
-
-
Save papaeye/2966536 to your computer and use it in GitHub Desktop.
A patch to fix infopath for self-contained emacs23.4/24.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lisp/info.el b/lisp/info.el | |
index e5c258a..30d944f 100644 | |
--- a/lisp/info.el | |
+++ b/lisp/info.el | |
@@ -597,7 +597,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 | |
+ (or (featurep 'ns) (featurep 'mac)) | |
+ (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 6f3ea80..baf6435 100644 | |
--- a/lisp/paths.el | |
+++ b/lisp/paths.el | |
@@ -53,7 +53,12 @@ comparison." | |
(defvar 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 (or (featurep 'ns) (featurep 'mac)) | |
+ (let ((dir (expand-file-name "../info" data-directory))) | |
+ (if (file-directory-p dir) dir))) | |
+ configure-info-directory))) | |
(config | |
(list config-dir)) | |
(unpruned-prefixes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from http://lists.gnu.org/archive/html/emacs-diffs/2012-05/msg00398.html