X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=lispstrack.lisp;h=bbfa92455c7403f3aa68efce105bea6ab32043cc;hb=7392f25d8e6c4f45a075a82a245475b08b5578a1;hp=99325b972c4a1eb35d43b12a7b6cf976c1236534;hpb=e06bf3668298000dbe652085633b83f7f1254a7c;p=jscl.git diff --git a/lispstrack.lisp b/lispstrack.lisp index 99325b9..bbfa924 100644 --- a/lispstrack.lisp +++ b/lispstrack.lisp @@ -1,7 +1,8 @@ ;;; lispstrack.lisp --- ;; Copyright (C) 2012 David Vazquez -;; +;; Copyright (C) 2012 Raimon Grau + ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation, either version 3 of the @@ -28,18 +29,24 @@ `(eval-when-compile (%compile-defmacro ',name '(lambda ,args ,@body)))))) - (defmacro defvar (name value) + (defmacro %defvar (name value) `(progn (eval-when-compile (%compile-defvar ',name)) (setq ,name ,value))) - (defmacro defun (name args &rest body) + (defmacro defvar (name value) + `(%defvar ,name ,value)) + + (defmacro %defun (name args &rest body) `(progn (eval-when-compile (%compile-defun ',name)) (fsetq ,name (lambda ,args ,@body)))) + (defmacro defun (name args &rest body) + `(%defun ,name ,args ,@body)) + (defvar *package* (new)) (defvar nil (make-symbol "NIL")) @@ -126,6 +133,16 @@ #+lispstrack (progn + (defmacro defun (name args &rest body) + `(progn + (%defun ,name ,args ,@body) + ',name)) + + (defmacro defvar (name value) + `(progn + (%defvar ,name ,value) + ',name)) + (defun append-two (list1 list2) (if (null list1) list2