I'm writing to ask how to redefine the "or" macro in ABCL.
I'm working on a project and there's one package in which I need "or" to mean something else than its usual definition. I've tried simply to redefine it, but it doesn't work. I understand that the Common Lisp spec requires special provision for that to be done --- such as the package-lock construct in SBCL.
How can I do that in ABCL? I want to be able to do this within the code, for example, with in a "let" so that I can bound its scope.
Can anyone point me in the right direction? My first --- failed --- experiment is below.
Thanks!
Peter
------------------------------------------------------- A way that doesn't work.
slipstream:~ pcolsen$ abcl Armed Bear Common Lisp 0.17.0 Java 1.5.0_20 Apple Inc. Java HotSpot(TM) Client VM Low-level initialization completed in 1.476 seconds. Startup completed in 4.363 seconds. Type ":help" for a list of available commands. CL-USER(1): (or nil t) T CL-USER(2): (defmacro or (x) (+ 1 x)) ; My very own new "or" OR CL-USER(3): (or 3) ; Result should be 4 3 CL-USER(4): (or nil nil) ; My "or" should take only one argument. NIL CL-USER(5): (or nil t) T CL-USER(6): ;;; Redefinition didn't work.
Peter Olsen olsen@sigmaxi.net
I have loved the stars too fondly to be fearful of the night. Galileo Galilei