From: samwise gamgee
Subject: Defvar and setf
Date: 
Message-ID: <3AE7EC7C.64425068@yahoo.com>
could someone please tell me the difference between defvar, defparameter
and setf and the effects these macros have and why some are mostly used
at the top level and some are mostly used inside functions and
expresions

From: Christopher Stacy
Subject: Re: Defvar and setf
Date: 
Message-ID: <uvgnrx4a9.fsf@spacy.Boston.MA.US>
>>>>> On Thu, 26 Apr 2001 10:38:05 +0100, samwise gamgee ("samwise") writes:

 samwise> could someone please tell me the difference between defvar, defparameter
 samwise> and setf and the effects these macros have and why some are mostly used
 samwise> at the top level and some are mostly used inside functions and
 samwise> expresions

I would recommend consulting the Hyperspec, for example at:
 <http://www.xanalys.com/software_tools/reference/HyperSpec/FrontMatter/index.html>
There you can look up the documentation for each of those forms,
which includes an explanation of the differences between them.
I suggest looking up: DEFVAR, DEFPARAMETER, DEFCONSTANT, SETQ,
and SETF, in that order.
From: Christopher J. Vogt
Subject: Re: Defvar and setf
Date: 
Message-ID: <3AE826C2.F858A2B3@computer.org>
Christopher Stacy wrote:
> 
> >>>>> On Thu, 26 Apr 2001 10:38:05 +0100, samwise gamgee ("samwise") writes:
> 
>  samwise> could someone please tell me the difference between defvar, defparameter
>  samwise> and setf and the effects these macros have and why some are mostly used
>  samwise> at the top level and some are mostly used inside functions and
>  samwise> expresions
> 
> I would recommend consulting the Hyperspec, for example at:
>  <http://www.xanalys.com/software_tools/reference/HyperSpec/FrontMatter/index.html>
> There you can look up the documentation for each of those forms,
> which includes an explanation of the differences between them.
> I suggest looking up: DEFVAR, DEFPARAMETER, DEFCONSTANT, SETQ,
> and SETF, in that order.

In addition to looking these up in the spec, since all but setq are macros, macroexpand them.  You can do that in emacs, or like this:
(macroexpand '(defvar foo bar "baz"))