From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: add directories to load-path Date: Mon, 12 Oct 2009 13:40:17 +0200 Organization: aich tea tea pea dicky riley dot net Message-ID: References: <87zl8w3h26.fsf@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255347658 26731 80.91.229.12 (12 Oct 2009 11:40:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2009 11:40:58 +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 13:40:48 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 1MxJGe-00070f-2v for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Oct 2009 13:40:44 +0200 Original-Received: from localhost ([127.0.0.1]:46127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxJGd-00047r-Ii for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Oct 2009 07:40:43 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!feeder.eternal-september.org!eternal-september.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-X-Trace: news.eternal-september.org U2FsdGVkX1/7UTCXTM1oy8GMJrX9zKfgpDDbKfbEAkgedlTRlWMcEqZCdI+LyyAevhalUrYT8Gpntug7Airkyl0BRGxzuKxyRxSYddM9K8s6QkU+8k9KrhNpBA7zeSPC2FJ+2XpEviFptrTCp0hmdw== Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Mon, 12 Oct 2009 11:40:20 +0000 (UTC) X-Auth-Sender: U2FsdGVkX18O7VAGIwHES74Q2ob/yaCaDcpHUZyPwyE= Cancel-Lock: sha1:GIXEfQlR4A0CbGPS+dhNR4U2SS0= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:173787 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:68875 Archived-At: dkcombs@panix.com (David Combs) writes: > 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? A slash. > > First time I've seen a slash in the name of a function... > Perfectly legal and often used to make functions more local/attributable e.g your own functions might be (defun dc/message(text) ... > Thanks, > > David >