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

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

Re: Dynamically set the load-path


From: grein46087
Subject: Re: Dynamically set the load-path
Date: Mon, 16 Oct 2006 18:08:31 -0700 (PDT)



Kevin Rodgers wrote:
> 
> grein46087 wrote:
>> I am looking to set the load path depending onenvironment,  Here are two
>> sonditional statements, and I will be looking to add another,  The
>> problem I
>> have is the load-path does not evaluate the variables, my-load-path
>> correctly.  Is there something I not doing correctly.  Any help is
>> greatly
>> appreciated
>> 
>> (setq my-emacs-lisp "~/.emacs.d/lisp/")
>> (defvar my-load-path nil)
>> (when (eq system-type 'windows-nt)
>>           (message "GEEK: Setting my-load-path for Windows-NT" )
>>           (setq my-load-path (append '(
>>                      "~/.emacs.d/lisp/"
>>                      "c:/bin/emacs/lisp"
>>                      "c:/bin/emacs/site-lisp"
>>                      "c:/gnu/emacs-21.3/lisp"
>>                      "c:/gnu/emacs-21.3/site-lisp"
>>                      ) my-load-path)))
>> (when (eq system-type 'mac)
>>           (message "GEEK: Setting my-load-path for MAC" )
>>           (setq my-load-path (append '(
>>                      "~/.emacs.d/lisp/"
>>                      "/Applications/Emacs.app/Contents/Resources/lisp"
>>                     
>> "/Applications/Emacs.app/Contents/Resources/site-lisp"
>>                      ) my-load-path)))
>> (setq load-path (append '(my-emacs-lisp my-load-path) load-path ))
> 
> There's your problem.  You're appending the value of load-path to
> a list of two symbols.  You mean to do this:
> 
> (setq load-path
>        (cons my-emacs-lisp (append my-load-path load-path)))
> 
>> (message "GEEK: load-path=[%s]" load-path )
> 
> -- 
> Kevin
> 
> 
> 
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
> 
> 

Kevin,

Many Thanks,  That really helped.  :-)

Hans

-- 
View this message in context: 
http://www.nabble.com/Dynamically-set-the-load-path-tf2454903.html#a6846636
Sent from the Emacs - Help mailing list archive at Nabble.com.





reply via email to

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