Path: utzoo!attcan!uunet!husc6!uwvax!oddjob!ncar!ames!ucsd!ucsdhub!hp-sdd!hplabs!cae780!leadsv!laic!nova!eric From: eric@nova.laic.uucp (Eric A. Raymond) Newsgroups: comp.lang.lisp Subject: Re: SETQ vs DEFVAR at the top level Message-ID: <280@laic.UUCP> Date: 2 Jul 88 21:33:51 GMT References: <4431@medusa.cs.purdue.edu> <4434@medusa.cs.purdue.edu> Sender: news@laic.UUCP Lines: 20 In article <4434@medusa.cs.purdue.edu>, bouma@cs.purdue.EDU (William J. Bouma) writes: > Can anyone tell me why the CL designers chose to have LET behave in > this manner? How about: (defmacro WITH-SPECIAL-PRINTING (&body body) `(let ((*print-length* 3) (*print-level* 2)) ,@body)) This modifies the behavior of any calls to the standard output functions within the body (via the two special vars). It is much cleaner than saving the old value of each variable, setting a new value, executing the code, and then restoring the old value. This is a very useful behavior which intuitively reflects a natural interpretation of global variables. Global means gloabal, doesn't it. It should not mean global with local constraints. Eric A. Raymond - ...ucbvax!sun!sunncal!leadsv!laic!eric