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: Maurizio Vitale
Subject: Re: add directories to load-path
Date: Tue, 15 Sep 2009 08:24:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>>>>> "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"))

OTH,

  Maurizio





reply via email to

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