From 6c4a545b30c601047091ac9439741ba52a3334d2 Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sun, 19 Oct 2025 08:50:52 +0300 Subject: Make state be a global special variable --- src/tg/method-macros.lisp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/tg/method-macros.lisp') diff --git a/src/tg/method-macros.lisp b/src/tg/method-macros.lisp index 00adf95..56445e3 100644 --- a/src/tg/method-macros.lisp +++ b/src/tg/method-macros.lisp @@ -6,8 +6,8 @@ (:import-from :alexandria :with-gensyms) (:import-from :com.dieggsy.f-string :enable-f-strings) (:import-from :serapeum :take) + (:import-from :state) (:import-from :str) - (:import-from :ukkoclot/src/state :bot) (:import-from :ukkoclot/src/transport :do-call) (:export :define-tg-method)) (in-package :ukkoclot/src/tg/method-macros) @@ -53,9 +53,9 @@ `(,(param-name param) ,(param-default param))) (defun emit-defun (name return-type params method) - (with-gensyms (args bot) - `(defun ,name (,bot &key ,@(iter (for param in params) ; lint:suppress lambda-list-invalid - (collect (emit-defun-arg param)))) + (with-gensyms (args) + `(defun ,name (&key ,@(iter (for param in params) ; lint:suppress lambda-list-invalid + (collect (emit-defun-arg param)))) (let (,args) ,@(iter (for param in (reverse params)) (collect (if (param-skip-if-default param) @@ -63,11 +63,11 @@ ,(param-default param)) ,(emit-append-to-args param args)) (emit-append-to-args param args)))) - (do-call ,bot ,method ,(path-from-name name) ',return-type ,args))))) + (do-call ,method ,(path-from-name name) ',return-type ,args))))) (defun emit-ftype (name return-type params) - `(declaim (ftype (function (bot &key ,@(iter (for param in params) - (collect (emit-arg-type param)))) + `(declaim (ftype (function (&key ,@(iter (for param in params) + (collect (emit-arg-type param)))) ,return-type) ,name)))) -- cgit v1.2.3