aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-05-26 14:17:06 -0700
committerGlenn Morris2012-05-26 14:17:06 -0700
commit04188bb9ad26b7e79625571fbef39b304449496a (patch)
tree319167701d8d202872c899c40e02d18006b52983
parent5db10eafdc96ee1e6b4e3f5bf170e157b9ee00f0 (diff)
downloademacs-04188bb9ad26b7e79625571fbef39b304449496a.tar.gz
emacs-04188bb9ad26b7e79625571fbef39b304449496a.zip
* lisp/paths.el (Info-default-directory-list): Make it a defcustom.
This is mainly so that we can use custom-initialize-delay, which means we do not have to worry about "unpruned" directories.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/paths.el37
2 files changed, 27 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3fffad2f137..48cc0ca22ae 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-05-26 Glenn Morris <rgm@gnu.org>
2
3 * paths.el (Info-default-directory-list): Make it a defcustom,
4 mainly so that we can use custom-initialize-delay.
5
12012-05-26 Stefan Monnier <monnier@iro.umontreal.ca> 62012-05-26 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * subr.el (buffer-has-markers-at): Mark obsolete. 8 * subr.el (buffer-has-markers-at): Mark obsolete.
diff --git a/lisp/paths.el b/lisp/paths.el
index 85571ac42bf..4d7e3718be2 100644
--- a/lisp/paths.el
+++ b/lisp/paths.el
@@ -31,22 +31,22 @@
31 31
32;;; Code: 32;;; Code:
33 33
34(defvar Info-default-directory-list 34;; This is a defcustom largely so that we can get the benefit
35;; of custom-initialize-delay. Perhaps it would work to make it a
36;; defvar and explicitly give it a standard-value property, and
37;; call custom-initialize-delay on it.
38(defcustom Info-default-directory-list
35 (let* ((config-dir 39 (let* ((config-dir
36 (file-name-as-directory configure-info-directory)) 40 (file-name-as-directory configure-info-directory))
37 (config
38 (list config-dir))
39 (unpruned-prefixes
40 ;; Directory trees that may not exist at installation time, and
41 ;; so shouldn't be pruned based on existence.
42 '("/usr/local/"))
43 (prefixes 41 (prefixes
44 ;; Directory trees in which to look for info subdirectories 42 ;; Directory trees in which to look for info subdirectories
45 (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/") 43 (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/")))
46 unpruned-prefixes))
47 (suffixes 44 (suffixes
48 ;; Subdirectories in each directory tree that may contain info 45 ;; Subdirectories in each directory tree that may contain info
49 ;; directories. 46 ;; directories. Most of these are rather outdated.
47 ;; It ought to be fine to stop checking the "emacs" ones now,
48 ;; since this is Emacs and we have not installed info files
49 ;; into such directories for a looong time...
50 '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/" 50 '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/"
51 "emacs/" "lib/" "lib/emacs/")) 51 "emacs/" "lib/" "lib/emacs/"))
52 (standard-info-dirs 52 (standard-info-dirs
@@ -56,16 +56,16 @@
56 (mapcar (lambda (sfx) 56 (mapcar (lambda (sfx)
57 (concat pfx sfx "info/")) 57 (concat pfx sfx "info/"))
58 suffixes))) 58 suffixes)))
59 (if (member pfx unpruned-prefixes) 59 (prune-directory-list dirs)))
60 dirs
61 (prune-directory-list dirs config))))
62 prefixes)))) 60 prefixes))))
63 ;; If $(prefix)/share/info is not one of the standard info 61 ;; If $(prefix)/share/info is not one of the standard info
64 ;; directories, they are probably installing an experimental 62 ;; directories, they are probably installing an experimental
65 ;; version of Emacs, so make sure that experimental version's Info 63 ;; version of Emacs, so make sure that experimental version's Info
66 ;; files override the ones in standard directories. 64 ;; files override the ones in standard directories.
67 (if (member config-dir standard-info-dirs) 65 (if (member config-dir standard-info-dirs)
68 (nconc standard-info-dirs config) 66 ;; FIXME? What is the point of adding it again at the end
67 ;; when it is already present earlier in the list?
68 (nconc standard-info-dirs (list config-dir))
69 (cons config-dir standard-info-dirs))) 69 (cons config-dir standard-info-dirs)))
70 "Default list of directories to search for Info documentation files. 70 "Default list of directories to search for Info documentation files.
71They are searched in the order they are given in the list. 71They are searched in the order they are given in the list.
@@ -79,7 +79,14 @@ Once Info is started, the list of directories to search
79comes from the variable `Info-directory-list'. 79comes from the variable `Info-directory-list'.
80This variable `Info-default-directory-list' is used as the default 80This variable `Info-default-directory-list' is used as the default
81for initializing `Info-directory-list' when Info is started, unless 81for initializing `Info-directory-list' when Info is started, unless
82the environment variable INFOPATH is set.") 82the environment variable INFOPATH is set.
83
84Although this is a customizable variable, that is mainly for technical
85reasons. Normally, you should either set INFOPATH or customize
86`Info-additional-directory-list', rather than changing this variable."
87 :initialize 'custom-initialize-delay
88 :type '(repeat directory)
89 :group 'info)
83 90
84 91
85;;; paths.el ends here 92;;; paths.el ends here