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: Kevin Rodgers
Subject: Re: Dynamically set the load-path
Date: Mon, 16 Oct 2006 17:02:50 -0600
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

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





reply via email to

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