From: David Vazquez Date: Fri, 21 Dec 2012 17:30:32 +0000 (+0000) Subject: Move package code to the beginning of th file X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=870d04725fb4fbcdb2ba2ed1c31bae6e5a2b94b1;p=jscl.git Move package code to the beginning of th file --- diff --git a/test.lisp b/test.lisp index 1568b92..489c36c 100644 --- a/test.lisp +++ b/test.lisp @@ -12,15 +12,25 @@ (%compile-defvar ',name)) (setq ,name ,value))) -(defvar t 't) -(defvar nil 'nil) - (defmacro defun (name args &rest body) `(progn (eval-when-compile (%compile-defun ',name)) (fsetq ,name (lambda ,args ,@body)))) +(defvar *package* (new)) + +(defvar t 't) +(defvar nil 'nil) + +(defun intern (name) + (let ((s (get *package* name))) + (if s s (set *package* name (make-symbol name))))) + +(defun find-symbol (name) + (get *package* name)) + + (defmacro when (condition &rest body) `(if ,condition (progn ,@body) nil)) @@ -107,17 +117,6 @@ (defmacro push (x place) `(setq ,place (cons ,x ,place))) -(defvar *package* (new)) - -(defun intern (name) - (let ((s (get *package* name))) - (if s - s - (set *package* name (make-symbol name))))) - -(defun find-symbol (name) - (get *package* name)) - (defmacro cond (&rest clausules) (if (null clausules) nil @@ -844,3 +843,6 @@ (defun eval (x) (js-eval (ls-compile x nil nil))) + + +(debug (eq (ls-read-from-string "+") '+))