From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dkcombs@panix.com (David Combs) Newsgroups: gmane.emacs.help Subject: Re: add directories to load-path Date: Mon, 12 Oct 2009 03:24:05 +0000 (UTC) Organization: Public Access Networks Corp. Message-ID: References: <87zl8w3h26.fsf@online.de> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1255318969 18097 80.91.229.12 (12 Oct 2009 03:42:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2009 03:42:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 12 05:42:39 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MxBnz-0006GB-Dp for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Oct 2009 05:42:39 +0200 Original-Received: from localhost ([127.0.0.1]:43755 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxBny-0006FQ-SQ for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Oct 2009 23:42:38 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: panix2.panix.com Original-X-Trace: reader1.panix.com 1255317845 22482 166.84.1.2 (12 Oct 2009 03:24:05 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Mon, 12 Oct 2009 03:24:05 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Original-Xref: news.stanford.edu gnu.emacs.help:173775 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:68859 Archived-At: In article , Maurizio Vitale wrote: >>>>>> "henry" == henry atting writes: > > henry> How can I add directories to the load-path *including* all > henry> subdirectories? > > henry> At present I do it this way > > henry> (setq load-path (append '( "/some/directory" > henry> "/some/directory/subdirectory") load-path)) > > henry> which is not very handy when a directory contains several > henry> different subdirectories with elisp files. > >I use this: > >(defun pm/add-tree-to-load-path (dirs) > (mapc (lambda (dir) > (let* ((default-directory dir)) > (setq load-path (cons dir load-path)) > (normal-top-level-add-subdirs-to-load-path))) > dirs)) > >(pm/add-tree-to-load-path '("~/.emacs.d/config" "~/.emacs.d/packages")) What's that slash after the pm? First time I've seen a slash in the name of a function... Thanks, David