I know we have defvar
and setq
. defvar
has a special meaning on defining global variables because the assignment only happens once. So I was thinking about use setq
to get the desired behavior of defparameter
from Common Lisp. However when I use setq
without defvar
(as replacement) I got a warning: reference to free-variable
.
I saw on the table of hyperpolyglot lisp global-var section which relates defparameter
with setq
and set
, so seems this is common. But I'm still wondering about the warnings...
There is another alternative to declare global variables as defparameter
does? (declare and can change calling again)
defvar
doesn't reset the variable when loading lisp code, you canC-M-x
on the form to reset it manually.