Hi,
What's the proper idiom when writing a function that might start wish or
might be called inside another with-ltk?
For example,
(defun some-window ()
(ensure-ltk ()
...))
Where some-window could be called from a REPL or from a tk callback? Is
there already a way to do this in ltk, or should I define a macro
something like the following seemingly broken code?
(defmacro ensure-ltk ((&rest options) &body body)
(let ((fname (gensym)))
`(labels ((,fname () ,@body))
(if (wish-stream *wish*)
(,fname)
(with-ltk ,options (,fname))))))
Thanks,
Daniel