As a quick follow up to my post of yesterday, I've updated my common-idioms package to contain 100% MORE EVIL. Included are two symbol property-list abusing macros, one of which depends on order of expansion and is thus technically not ANSI.

The first of these macros is symbolic IF, which works as follows:

(let ((x (list 1 2 3))) (sif (cdr x) (sif (car it) (setf it 'foo))) x) => (1 foo 3)

The second is let-env, which is the unportable one I mentioned:

(let ((x 1) (y 2)) (let-env env (append (let ((x 3) (y 4)) (setf x 5) (env (x) (setf x 6) (setf y 7)) (list x y)) (list x y)))) => (5 7 6 2)Also, the completely unportable but highly useful EXPAND-ONLY has been extended to allow expanding of all macros (pass T for the name list) and to return a second value containing an alist of (form expansion) pairs for forms that couldn't be found in the current expansion (happens often with SETF).

If you're interested, head over to CLiki and check it out.