Subject: Re: How do I automatically load files at Lisp startup
From: rpw3@rpw3.org (Rob Warnock)
Date: Wed, 26 Apr 2006 05:23:32 -0500
Newsgroups: comp.lang.lisp
Message-ID: <EqudnZgE7ZO519LZnZ2dnUVZ_s6dnZ2d@speakeasy.net>
Jeffery Zhang  <jz87@cornell.edu> wrote:
+---------------
| Suppose I wrote a macro and saved it in ~/macro.lisp and I would like 
| to load this file (macro) into the lisp environment everytime I start 
| lisp. How would I do this?
+---------------

It depends on the implementation [and what follows is oversimplified],
but almost all of them provide some sort of "rc" initialization file
you can put in your home directory that will be automatically loaded
on startup, e.g.:

    CMUCL:	~/.cmucl-init
    SBCL:	~/.sbclrc
    CLISP:	~/.clisprc

Then in that file you can put a (LOAD "home:macro.lisp")
[or however your implementation represents a path to $HOME/].


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607