From 1d3ea0158e2e12e5296d1e8816ec3fb5c76173d2 Mon Sep 17 00:00:00 2001 From: Raimon Grau Date: Sun, 16 Dec 2012 01:34:15 +0100 Subject: [PATCH] removed the old-style incf --- test.lisp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/test.lisp b/test.lisp index e7209a1..1ef21de 100644 --- a/test.lisp +++ b/test.lisp @@ -24,29 +24,17 @@ (debug "---MACROS---") (eval-when-compile - (%compile-defmacro 'incf - (lambda (y) - (list 'setq y (list '+ 1 y))))) - -(eval-when-compile - (%compile-defvar 'x)) - -(setq x 0) -(incf x) -(debug x) - -(eval-when-compile (%compile-defmacro 'defmacro (lambda (name args &rest body) (list 'eval-when-compile (list '%compile-defmacro (list 'quote name) (list* 'lambda args body)))))) -(defmacro %incf (x) +(defmacro incf (x) (list 'setq x (list '+ 1 x))) (setq x 10) -(%incf x) +(incf x) (debug x) @@ -54,3 +42,4 @@ (debug (lambda (&rest x) x)) (debug (lambda (x y &rest z) x)) +(debug (lambda (x y &rest z) y)) -- 1.7.10.4