Kenneth Tilton <[email protected]> writes:
> If they had not screwed up and called prog0 prog1 I would consider
> using the damn thing.
They didn't screw up:
(defpackage "KTLISP"
(:use "CL")
(:shadow "PROG1" "PROG2" "PROGN")
(:export "PROG0" "PROGN-1")
(:export . #.(let ((l '()))
(do-external-symbols (s "CL")
(push (symbol-name s) l)) l)))
(in-package "KTLISP")
(defmacro prog0 (&rest body) `(cl:prog1 ,@body))
(defmacro prog1 (&rest body) `(cl:prog2 ,@body))
(defmacro progn-1 (&rest body) `(cl:progn ,@body))
(defmacro progn (&rest body) `(cl:progn ,@body (values)))
(defpackage "KTLISP-USER"
(:use "KTLISP"))
(in-package "KTLISP-USER")
(prog1 'hi '(hello world))
--> (HELLO WORLD)
--
__Pascal Bourguignon__
http://www.informatimago.com/
"Le mercure monte ? C'est le moment d'acheter !"