1.1--- a/lisp/lib/cli/clap/macs.lisp Sun Sep 15 22:23:16 2024 -0400
1.2+++ b/lisp/lib/cli/clap/macs.lisp Mon Sep 16 21:28:33 2024 -0400
1.3@@ -45,21 +45,19 @@
1.4
1.5 ;; TODO fix these macros
1.6 (defmacro defcmd (name &body body)
1.7- `(defun ,name (args opts)
1.8+ `(defun ,name (args opts)
1.9 (declare (ignorable args opts)
1.10 (sequence args opts))
1.11- (setq
1.12- *argc* (length args)
1.13- *optc* (length opts)
1.14- *args* args
1.15- *opts* opts)
1.16- ,@body))
1.17+ (let ((*argc* (length args))
1.18+ (*optc* (length opts))
1.19+ (*args* args)
1.20+ (*opts* opts))
1.21+ ,@body)))
1.22
1.23 (defmacro defopt (name &body body)
1.24 `(defun ,name (&optional arg)
1.25- (declare (ignorable arg))
1.26- (setq *arg* arg)
1.27- ,@body))
1.28+ (let ((*arg* arg))
1.29+ ,@body)))
1.30
1.31 ;; TODO 2023-10-06:
1.32 ;; (defmacro gen-cli-thunk (pvars &rest thunk)