emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108382: Replace w32-init-info throug


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108382: Replace w32-init-info through the magic of custom-initialize-delay
Date: Sat, 26 May 2012 14:58:01 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108382
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2012-05-26 14:58:01 -0700
message:
  Replace w32-init-info through the magic of custom-initialize-delay
  
  * lisp/w32-fns.el (w32-init-info): Remove.
  * lisp/paths.el (Info-default-directory-list): Add w32-init-info equivalent.
modified:
  lisp/ChangeLog
  lisp/paths.el
  lisp/w32-fns.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-05-26 21:23:28 +0000
+++ b/lisp/ChangeLog    2012-05-26 21:58:01 +0000
@@ -1,6 +1,8 @@
 2012-05-26  Glenn Morris  <address@hidden>
 
-       * paths.el (Info-default-directory-list):
+       * w32-fns.el (w32-init-info): Remove.
+       * paths.el (Info-default-directory-list): Add w32-init-info equivalent.
+
        * info.el (info-initialize): For self-contained NS builds, put the
        included info/ directory at the front.  (Bug#2791)
 

=== modified file 'lisp/paths.el'
--- a/lisp/paths.el     2012-05-26 21:23:28 +0000
+++ b/lisp/paths.el     2012-05-26 21:58:01 +0000
@@ -62,16 +62,27 @@
                                            (concat pfx sfx "info/"))
                                          suffixes)))
                             (prune-directory-list dirs)))
-                        prefixes))))
-    ;; If $(prefix)/share/info is not one of the standard info
-    ;; directories, they are probably installing an experimental
-    ;; version of Emacs, so make sure that experimental version's Info
-    ;; files override the ones in standard directories.
-    (if (member config-dir standard-info-dirs)
-       ;; FIXME?  What is the point of adding it again at the end
-       ;; when it is already present earlier in the list?
-       (nconc standard-info-dirs (list config-dir))
-      (cons config-dir standard-info-dirs)))
+                        prefixes)))
+        ;; If $(prefix)/share/info is not one of the standard info
+        ;; directories, they are probably installing an experimental
+        ;; version of Emacs, so make sure that experimental version's Info
+        ;; files override the ones in standard directories.
+        (dirs
+         (if (member config-dir standard-info-dirs)
+             ;; FIXME?  What is the point of adding it again at the end
+             ;; when it is already present earlier in the list?
+             (nconc standard-info-dirs (list config-dir))
+           (cons config-dir standard-info-dirs))))
+    (if (not (eq system-type 'windows-nt))
+       dirs
+      ;; Include the info directory near where Emacs executable was installed.
+      (let* ((instdir (file-name-directory invocation-directory))
+            (dir1 (expand-file-name "../info/" instdir))
+            (dir2 (expand-file-name "../../../info/" instdir)))
+       (cond ((file-exists-p dir1) (append dirs (list dir1)))
+             ((file-exists-p dir2) (append dirs (list dir2)))
+             (t dirs)))))
+
   "Default list of directories to search for Info documentation files.
 They are searched in the order they are given in the list.
 Therefore, the directory of Info files that come with Emacs

=== modified file 'lisp/w32-fns.el'
--- a/lisp/w32-fns.el   2012-02-28 08:17:21 +0000
+++ b/lisp/w32-fns.el   2012-05-26 21:58:01 +0000
@@ -192,24 +192,6 @@
                     (w32-get-locale-info locale)
                     (w32-get-locale-info locale t))))))
 
-;; Setup Info-default-directory-list to include the info directory
-;; near where Emacs executable was installed.  We used to set INFOPATH,
-;; but when this is set Info-default-directory-list is ignored.  We
-;; also cannot rely upon what is set in paths.el because they assume
-;; that configuration during build time is correct for runtime.
-(defun w32-init-info ()
-  (let* ((instdir (file-name-directory invocation-directory))
-        (dir1 (expand-file-name "../info/" instdir))
-        (dir2 (expand-file-name "../../../info/" instdir)))
-    (if (file-exists-p dir1)
-       (setq Info-default-directory-list
-             (append Info-default-directory-list (list dir1)))
-      (if (file-exists-p dir2)
-         (setq Info-default-directory-list
-               (append Info-default-directory-list (list dir2)))))))
-
-(add-hook 'before-init-hook 'w32-init-info)
-
 ;; The variable source-directory is used to initialize Info-directory-list.
 ;; However, the common case is that Emacs is being used from a binary
 ;; distribution, and the value of source-directory is meaningless in that


reply via email to

[Prev in Thread] Current Thread [Next in Thread]