Hi Chouser,

On Nov 20, 7:34 am, Chouser <[EMAIL PROTECTED]> wrote:
> On Thu, Nov 20, 2008 at 10:03 AM, wlr <[EMAIL PROTECTED]> wrote:
>
> > As stated inhttp://clojure.org/getting_startedif user.clj is found
> > on the classpath it will be autoloaded at clojure startup. Answers to
> > the subject question will perhaps change as users and clojure mature
> > together, but for now  will you divulge (some of) your user.clj?
>
> > So far for me: user.clj is empty
>
> I used to use user.clj for the following, but that doesn't always work
> right (did it have something to do with *print-length* not being bound
> for clojure.lang.Script? I'm don't quite remember...)  So anyway, I
> have a little shell script that runs clojure for me with the right
> classpath and, when launching a REPL, with ~/.clojurerc.clj on its
> command line.  In .clojurerc.clj, I have:
>
> (import '(java.io LineNumberReader InputStreamReader PushbackReader)
>         '(java.lang.reflect Modifier Method Constructor)
>         '(clojure.lang RT))
>
> (set! *print-length* 103)
>
> (defn show
>   ([x] (show x nil))
>   ([x i]
>       (let [c (if (class? x) x (class x))
>             items (sort

Very nice! However, shouldn't the modification to *print-length* be
inside a binding - e.g.:

(defn show
  ([x] (show x nil))
  ([x i]
     (binding [*print-length* 103]
       (let [c (if (class? x) x (class x))
             items (sort

--
Bill Clementson
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to