From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.help Subject: Re: Extending Info-directory-list. There's got to be a better way. Date: Fri, 04 Apr 2003 07:31:44 +1000 Organization: Bah Humbug Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87vfxvz2rj.fsf@zip.com.au> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1049406345 7979 80.91.224.249 (3 Apr 2003 21:45:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 3 Apr 2003 21:45:45 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 03 23:45:40 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 191CWh-00023x-00 for ; Thu, 03 Apr 2003 23:45:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 191CNP-0004Kf-08 for gnu-help-gnu-emacs@m.gmane.org; Thu, 03 Apr 2003 16:36:03 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator2-sterling!news-in.nuthinbutnews.com!newsfeed.zip.com.au!nasal.pacific.net.au!127.0.0.1!nobody Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:8H4zCKqhqmB1CIbWoCwNwPYty3w= Original-Lines: 27 Original-NNTP-Posting-Host: 203.143.228.109 Original-X-Complaints-To: news@pacific.net.au Original-X-Trace: nasal.pacific.net.au 1049405266 203.143.228.109 (Fri, 04 Apr 2003 07:27:46 EST) Original-NNTP-Posting-Date: Fri, 04 Apr 2003 07:27:46 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:111649 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:8150 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8150 Alan Mackenzie 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))