cl-rw

Layered streams for Common Lisp
git clone https://logand.com/git/cl-rw.git/
Log | Files | Refs

commit cba736387f928cc08ca00863fb68c81c423fc817
parent 9804dc8a51005eef96cf278d2beceb25f8162438
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sun, 15 Jan 2017 12:11:33 +0100

remove unused code

Diffstat:
Mdemo-counter3.lisp | 52----------------------------------------------------
1 file changed, 0 insertions(+), 52 deletions(-)

diff --git a/demo-counter3.lisp b/demo-counter3.lisp @@ -28,10 +28,6 @@ (defvar *slet-state*) (defvar *slet-state-decoded*) (defvar *sflet-action*) -(defvar *slet-path*) -(defvar *slet-child*) -(defvar *sflet-path*) -(defvar *sflet-child*) (defvar *widget-path*) (defvar *widget-child*) (defvar *action-index*) @@ -89,30 +85,6 @@ (when (eq :step *mode*) (push (lambda () (values path (funcall get))) *slet-getters*)))) -(defmacro slet (vars &body body) - `(let ((*slet-path* (cons (incf *slet-child*) *slet-path*)) - (*slet-child* 0)) - (let ((slet-path *slet-path*)) - (let ,(loop - for x in vars - for i from 1 - collect (destructuring-bind (name value) - (if (atom x) `(,x nil) x) - `(,name - (or (lookup-var (encode-path slet-path ,i)) - ,value)))) - (when (eq :step *mode*) - ,@(loop - for x in vars - for i from 1 - collect (destructuring-bind (name value) - (if (atom x) `(,x nil) x) - (declare (ignore value)) - `(push (lambda () - (values (encode-path slet-path ,i) ,name)) - *slet-getters*)))) - ,@body)))) - (defun widget (thunk) (lambda () (let ((*widget-path* (cons (incf *widget-child*) *widget-path*)) @@ -132,26 +104,6 @@ (funcall thunk)) nil))))) -(defmacro sflet (funs &body body) - `(let ((*sflet-path* (cons (incf *sflet-child*) *sflet-path*)) - (*sflet-child* 0)) - (let ((sflet-path *sflet-path*)) - (flet ,(loop - for x in funs - for i from 1 - collect (destructuring-bind (name args &body body) x - `(,name - ,args - (ecase *mode* - (:draw - (encode-url *slet-state* - (encode-path sflet-path ,i))) - (:step - (when (equal *sflet-action* - (encode-path sflet-path ,i)) - ,@body) - nil))))) - ,@body)))) (defun counter-widget (i) (let ((n 0)) @@ -244,10 +196,6 @@ (let* ((*slet-state* (query-parameter "s")) (*slet-state-decoded* (ignore-errors (decode-state *slet-state*))) (*sflet-action* (query-parameter "a")) - *slet-path* - (*slet-child* 0) - *sflet-path* - (*sflet-child* 0) *widget-path* (*widget-child* 0) *slet-getters*