[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: two ways of adding a path to the list variable load-path. equivalent
From: |
Ralf Mattes |
Subject: |
Re: two ways of adding a path to the list variable load-path. equivalent? |
Date: |
Wed, 20 May 2009 08:48:36 +0000 (UTC) |
User-agent: |
Pan/0.132 (Waxed in Black) |
On Tue, 19 May 2009 10:33:09 -0700, Nobuko Three wrote:
> 1.
> (setq load-path (cons "~/elisp/" load-path))
>
> 2.
> (add-to-list 'load-path "~/elisp/")
>
> Are there any situation where one would prefer one over another?
The setq way will always add a new value to the list while add-to-list
will only add a value iff it's not already present in the list.
Usually one wants to have have a path only once in the load-path.
HTH Ralf Mattes