help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: add directories to load-path


From: Richard Riley
Subject: Re: add directories to load-path
Date: Mon, 12 Oct 2009 13:40:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

dkcombs@panix.com (David Combs) writes:

> In article <mailman.6708.1253017158.2239.help-gnu-emacs@gnu.org>,
> Maurizio Vitale  <maurizio.vitale@polymath-solutions.com> wrote:
>>>>>>> "henry" == henry atting <nsmp_01@online.de> 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
>


reply via email to

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