Closed canatella closed 5 years ago
In order to use aio you must use lexical scope. Unfortunately it's not yet the default for Emacs, so you must enable it explicitly using a file local variable:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Lexical-Binding.html
The reason is that aio is built atop Emacs generators, and these require lexical binding. Regardless, you should always enable lexical binding anyway since it has lots of advantages and no disadvantages:
I knew I was doing something wrong! Thank you very much.
And to really make lexical scope default everywhere
(run-at-time 0 nil (lambda ( ) (set-default 'lexical-binding t)))
So I'd like to use aio for a personal project on Emacs 26.3, but I cannot use aio-defun. I suppose I must be missing something: evaluating
Gives