From 6401376cfce4be41e163eb4c7cd9b848f4f955ec Mon Sep 17 00:00:00 2001 From: Henry Irvine Date: Mon, 6 May 2013 01:55:59 +0900 Subject: [PATCH] add prog macro --- src/boot.lisp | 6 ++++++ src/toplevel.lisp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/boot.lisp b/src/boot.lisp index 8c1d6c2..3ba4fda 100644 --- a/src/boot.lisp +++ b/src/boot.lisp @@ -227,6 +227,12 @@ (defmacro prog2 (form1 result &body body) `(prog1 (progn ,form1 ,result) ,@body)) +(defmacro prog (inits &rest body ) + (multiple-value-bind (forms decls docstring) (parse-body body) + `(block nil + (let ,inits + ,@decls + (tagbody ,@forms))))) ;;; Go on growing the Lisp language in Ecmalisp, with more high level diff --git a/src/toplevel.lisp b/src/toplevel.lisp index fa7c3f1..81315e1 100644 --- a/src/toplevel.lisp +++ b/src/toplevel.lisp @@ -68,7 +68,7 @@ multiple-value-call multiple-value-list multiple-value-prog1 nconc nil ninth not nreconc nth nthcdr null numberp or otherwise package-name package-use-list packagep pairlis parse-integer plusp - pop prin1-to-string print proclaim prog1 prog2 progn psetq push + pop prin1-to-string print proclaim prog prog1 prog2 progn psetq push quote rassoc read-from-string remove remove-if remove-if-not return return-from revappend reverse rplaca rplacd second set setf seventh setq sixth some string string-upcase string= stringp subseq subst -- 1.7.10.4