This a change in the upcoming 1.3 release. Vars have to be declared explicitly dynamic to be able to rebind them via binding. But I don't know the exact syntax how to do this.
Sincerely
Meikel
The docs refer to Clojure 1.2 but the error you're seeing indicates
you're running Clojure 1.3 (alpha/snapshot), yes?
In Clojure 1.3, variables must be declared dynamic in order to change
their bound value:
(def ^:dynamic x 1)
(def ^:dynamic y 1)
(binding [x 2 y 3] (+ x y))
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood