[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extending Info-directory-list. There's got to be a better way.
From: |
Kevin Ryde |
Subject: |
Re: Extending Info-directory-list. There's got to be a better way. |
Date: |
Fri, 04 Apr 2003 07:31:44 +1000 |
User-agent: |
Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (gnu/linux) |
Alan Mackenzie<none@example.invalid> writes:
>
> (eval-after-load "info"
> '(progn (info-initialize)
> (push "/usr/src/packages/BUILD/emacs-21.1/info/"
> Info-directory-list)))
>
> Surely there's got to be a better way?
I use the little function below. Still not a thing of beauty, but
avoids forcibly running info-initialize.
(defun my-info-directory (dir)
"Setup an extra info directory.
This is added to `Info-directory-list' if info has been initialized, or
to `Info-default-directory-list' if not.
`Info-additional-directory-list' is not used, since that comes after
`Info-directory-list' in the searching, and extras should come before the
standard locations."
(if (not (file-exists-p dir))
(message "Skipping %s" dir))
(add-to-list (if (boundp 'Info-directory-list)
'Info-directory-list
'Info-default-directory-list)
dir))