From 92fa390ba61ef75c1f1c7998b3ed008b11d96200 Mon Sep 17 00:00:00 2001 From: Sergey Kostyaev Date: Sat, 6 Jul 2024 04:07:55 +0700 Subject: [PATCH] Fix for closures on stream done --- ellama.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ellama.el b/ellama.el index edb619d..bad8629 100644 --- a/ellama.el +++ b/ellama.el @@ -1305,7 +1305,8 @@ failure (with BUFFER current). (with-current-buffer buffer (accept-change-group ellama--change-group) (spinner-stop) - (if (listp donecb) + (if (and (listp donecb) + (functionp (car donecb))) (mapc (lambda (fn) (funcall fn text)) donecb) (funcall donecb text))