Commit 38264cc9 authored by Glenn Morris's avatar Glenn Morris
Browse files

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.
parent eb7afdad
2012-05-26 Glenn Morris <rgm@gnu.org>
* 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)
......
......@@ -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
......
......@@ -192,24 +192,6 @@ You should set this to t when using a non-system shell.\n\n"))))
(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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment