author | Alan Dipert
<alan@dipert.org> 2021-07-01 04:13:58 UTC |
committer | Alan Dipert
<alan@dipert.org> 2021-07-01 04:13:58 UTC |
parent | c36126ef4b5c31f2b474c80f90d779c2418a9585 |
boot.lisp | +3 | -1 |
jacl-tests.lisp | +6 | -15 |
diff --git a/boot.lisp b/boot.lisp index da5e26a..0aff31a 100644 --- a/boot.lisp +++ b/boot.lisp @@ -145,7 +145,9 @@ (%export 'defvar) (defmacro defvar (symbol &optional (value nil value?)) - (%js "~{}.isSpecial = true" symbol) + ;; Arguably this sohuld work, but we should do it with + ;; DECLARE/DECLAIM + ;; (%js "~{}.isSpecial = true" symbol) `(progn (%js "~{}.isSpecial = true" ',symbol) (when (%js "(((~{}.value === UNDEFINED) && ~{}) ? true : null)" ',symbol ,value?) diff --git a/jacl-tests.lisp b/jacl-tests.lisp index 6ce88b2..b8975a1 100644 --- a/jacl-tests.lisp +++ b/jacl-tests.lisp @@ -62,11 +62,12 @@ (with-label "top-level defvar" (let ((*top-level-special-variable* 123)) (assert= (top-level-function-referencing-special-variable) 123))) - (with-label "inner defvar" - (defvar *inner-special-variable*) - (let ((doit (lambda () *inner-special-variable*))) - (let ((*inner-special-variable* 99)) - (assert= (funcall doit) 99))))) + ;; (with-label "inner defvar" + ;; (defvar *inner-special-variable*) + ;; (let ((doit (lambda () *inner-special-variable*))) + ;; (let ((*inner-special-variable* 99)) + ;; (assert= (funcall doit) 99)))) + ) (in-module "Lambda") @@ -268,13 +269,3 @@ ;; eval: (put 'with-read 'lisp-indent-function 1) ;; eval: (put 'deftest 'lisp-indent-function 'defun) ;; End: - -(let ((x 1)) - (let ((x 99) - (y (list x))) - y)) - -(let* ((x 1)) - (let* ((x 99) - (y (list x))) - y))