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

annoying compiler warnings again



 >Date: Tue, 15 Jun 93 14:54:17 EDT
 >From: hall@research.att.com (Bob Hall)
 >To: bug-mcl@cambridge.apple.com
 >Cc: info-mcl@cambridge.apple.com
 >Subject: annoying compiler warnings again
 >
 >Is there some way to keep the
 >TIME macro from complaining about undeclared free variables in a top-level
 >expression?  This is annoying because, among other things, it switches me
 >to the listener window from whatever buffer holds the TIME form, and makes
 >me have to read the error message and figure out why it should be ignored.
 >
 >example:
 >? (setq test-text "Blah, blah, blah.")

Just use 
  (defvar test-text "Blah, blah, blah.") 
instead.

In general, use defvar and defparameter to introduce a variable,
then just use setq (or setf) later. I know, it's a hard habit to 
break, but it leads to better programming style in the long run.