[Top][All Lists]

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

[Emacs-diffs] /srv/bzr/emacs/trunk r108380: * lisp/paths.el (Info-defaul

From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108380: * lisp/paths.el (Info-default-directory-list): Make it a defcustom.
Date: Sat, 26 May 2012 14:17:06 -0700
User-agent: Bazaar (2.5.0)

revno: 108380
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2012-05-26 14:17:06 -0700
  * 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.
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-05-26 19:55:07 +0000
+++ b/lisp/ChangeLog    2012-05-26 21:17:06 +0000
@@ -1,3 +1,8 @@
+2012-05-26  Glenn Morris  <address@hidden>
+       * paths.el (Info-default-directory-list): Make it a defcustom,
+       mainly so that we can use custom-initialize-delay.
 2012-05-26  Stefan Monnier  <address@hidden>
        * subr.el (buffer-has-markers-at): Mark obsolete.

=== modified file 'lisp/paths.el'
--- a/lisp/paths.el     2012-05-26 20:57:31 +0000
+++ b/lisp/paths.el     2012-05-26 21:17:06 +0000
@@ -31,22 +31,22 @@
 ;;; Code:
-(defvar Info-default-directory-list
+;; 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
   (let* ((config-dir
          (file-name-as-directory configure-info-directory))
-        (config
-         (list config-dir))
-        (unpruned-prefixes
-         ;; Directory trees that may not exist at installation time, and
-         ;; so shouldn't be pruned based on existence.
-         '("/usr/local/"))
          ;; Directory trees in which to look for info subdirectories
-         (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/")
-                               unpruned-prefixes))
+         (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/")))
          ;; Subdirectories in each directory tree that may contain info
-         ;; directories.
+         ;; 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...
          '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/"
            "emacs/" "lib/" "lib/emacs/"))
@@ -56,16 +56,16 @@
                                  (mapcar (lambda (sfx)
                                            (concat pfx sfx "info/"))
-                            (if (member pfx unpruned-prefixes)
-                                dirs
-                              (prune-directory-list dirs config))))
+                            (prune-directory-list dirs)))
     ;; 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)
-       (nconc standard-info-dirs config)
+       ;; 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)))
   "Default list of directories to search for Info documentation files.
 They are searched in the order they are given in the list.
@@ -79,7 +79,14 @@
 comes from the variable `Info-directory-list'.
 This variable `Info-default-directory-list' is used as the default
 for initializing `Info-directory-list' when Info is started, unless
-the environment variable INFOPATH is set.")
+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)
 ;;; paths.el ends here

reply via email to

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