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

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

Re: multiple load-paths?


From: Johan Bockgård
Subject: Re: multiple load-paths?
Date: Sat, 24 Nov 2007 17:05:15 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

someusernamehere <someusernamehere@gmail.com> writes:

> (setq load-path (cons (expand-file-name "~/lisp") load-path))
> (setq load-path (cons (expand-file-name "~/repos") load-path))
> (setq load-path (cons (expand-file-name "~/testing") load-path))
> (setq load-path (cons (expand-file-name "~/elisp") load-path))
>
> there is a way to do this more "posh" ?, I mean may be in one line o
> something similar?

I'd prefer

    (add-to-list 'load-path "~/lisp")
    (add-to-list 'load-path "~/repos")
    (add-to-list 'load-path "~/testing")
    (add-to-list 'load-path "~/elisp")

(add-to-list is shorter and avoids adding duplicates to load-path if
.emacs is reloaded.  expand-file-name shouldn't be necessary)

You could use a loop, but having one line per entry is more
grep-friendly. 

-- 
Johan Bockgård


reply via email to

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