2012-05-25 22:13:24 +00:00
|
|
|
;;; paths.el --- define pathnames for use by various Emacs commands
|
1992-05-30 22:12:04 +00:00
|
|
|
|
2012-05-24 06:42:26 +00:00
|
|
|
;; Copyright (C) 1986, 1988, 1994, 1999-2012 Free Software Foundation, Inc.
|
1992-07-22 04:22:42 +00:00
|
|
|
|
1992-07-16 21:47:34 +00:00
|
|
|
;; Maintainer: FSF
|
1992-07-17 20:24:00 +00:00
|
|
|
;; Keywords: internal
|
2010-08-29 16:17:13 +00:00
|
|
|
;; Package: emacs
|
1992-07-16 21:47:34 +00:00
|
|
|
|
1990-08-30 09:33:22 +00:00
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
2008-05-06 08:06:51 +00:00
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
1990-08-30 09:33:22 +00:00
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 08:06:51 +00:00
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
1990-08-30 09:33:22 +00:00
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2008-05-06 08:06:51 +00:00
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
1990-08-30 09:33:22 +00:00
|
|
|
|
1992-07-16 21:47:34 +00:00
|
|
|
;;; Commentary:
|
1990-08-30 09:33:22 +00:00
|
|
|
|
|
|
|
;; These are default settings for names of certain files and directories
|
|
|
|
;; that Emacs needs to refer to from time to time.
|
|
|
|
|
|
|
|
;; If these settings are not right, override them with `setq'
|
|
|
|
;; in site-init.el. Do not change this file.
|
|
|
|
|
1992-07-16 21:47:34 +00:00
|
|
|
;;; Code:
|
|
|
|
|
2012-05-26 21:17:06 +00:00
|
|
|
;; This is a defcustom largely so that we can get the benefit
|
|
|
|
;; of custom-initialize-delay. Perhaps it would work to make it a
|
|
|
|
;; defvar and explicitly give it a standard-value property, and
|
|
|
|
;; call custom-initialize-delay on it.
|
|
|
|
(defcustom Info-default-directory-list
|
2000-12-14 17:12:39 +00:00
|
|
|
(let* ((config-dir
|
2012-05-26 21:23:28 +00:00
|
|
|
(file-name-as-directory
|
|
|
|
;; Self-contained NS build with info/ in the app-bundle.
|
|
|
|
(or (and (featurep 'ns)
|
|
|
|
(let ((dir (expand-file-name "../info" data-directory)))
|
|
|
|
(if (file-directory-p dir) dir)))
|
|
|
|
configure-info-directory)))
|
2000-07-04 04:48:49 +00:00
|
|
|
(prefixes
|
|
|
|
;; Directory trees in which to look for info subdirectories
|
2012-05-26 21:17:06 +00:00
|
|
|
(prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/")))
|
2000-07-04 04:48:49 +00:00
|
|
|
(suffixes
|
|
|
|
;; Subdirectories in each directory tree that may contain info
|
2012-05-26 21:17:06 +00:00
|
|
|
;; directories. Most of these are rather outdated.
|
|
|
|
;; It ought to be fine to stop checking the "emacs" ones now,
|
|
|
|
;; since this is Emacs and we have not installed info files
|
|
|
|
;; into such directories for a looong time...
|
2007-01-18 16:07:36 +00:00
|
|
|
'("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/"
|
2000-12-14 17:12:39 +00:00
|
|
|
"emacs/" "lib/" "lib/emacs/"))
|
|
|
|
(standard-info-dirs
|
|
|
|
(apply #'nconc
|
|
|
|
(mapcar (lambda (pfx)
|
|
|
|
(let ((dirs
|
|
|
|
(mapcar (lambda (sfx)
|
|
|
|
(concat pfx sfx "info/"))
|
|
|
|
suffixes)))
|
2012-05-26 21:17:06 +00:00
|
|
|
(prune-directory-list dirs)))
|
2012-05-26 21:58:01 +00:00
|
|
|
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)))))
|
|
|
|
|
1996-06-19 22:14:31 +00:00
|
|
|
"Default list of directories to search for Info documentation files.
|
|
|
|
They are searched in the order they are given in the list.
|
1994-01-01 15:29:27 +00:00
|
|
|
Therefore, the directory of Info files that come with Emacs
|
2000-12-14 17:12:39 +00:00
|
|
|
normally should come last (so that local files override standard ones),
|
|
|
|
unless Emacs is installed into a non-standard directory. In the latter
|
|
|
|
case, the directory of Info files that come with Emacs should be
|
|
|
|
first in this list.
|
1996-06-19 22:14:31 +00:00
|
|
|
|
|
|
|
Once Info is started, the list of directories to search
|
|
|
|
comes from the variable `Info-directory-list'.
|
|
|
|
This variable `Info-default-directory-list' is used as the default
|
2000-05-30 20:40:42 +00:00
|
|
|
for initializing `Info-directory-list' when Info is started, unless
|
2012-05-26 21:17:06 +00:00
|
|
|
the environment variable INFOPATH is set.
|
|
|
|
|
|
|
|
Although this is a customizable variable, that is mainly for technical
|
|
|
|
reasons. Normally, you should either set INFOPATH or customize
|
|
|
|
`Info-additional-directory-list', rather than changing this variable."
|
|
|
|
:initialize 'custom-initialize-delay
|
|
|
|
:type '(repeat directory)
|
|
|
|
:group 'info)
|
1990-08-30 09:33:22 +00:00
|
|
|
|
1995-01-18 19:46:00 +00:00
|
|
|
|
1992-05-30 22:12:04 +00:00
|
|
|
;;; paths.el ends here
|