skeeto / emacs-aio

async/await for Emacs Lisp
The Unlicense
218 stars 12 forks source link

Add font locking for asynchronous functions. #8

Closed phst closed 4 years ago

phst commented 4 years ago

This is modeled after the font locking setup for Emacs Lisp ‘defun’ etc.

skeeto commented 4 years ago

Thanks for putting this together, but are aio-defun and aio-lambda not already highlighted for you? Emacs does this automatically when the macro is declared "indent defun". (The aio package must be loaded for this to take effect.)

phst commented 4 years ago

Hmm, this doesn't seem to work for me out of the box. I started Emacs with

emacs -Q -l ./aio.el ./aio.el

with a binary built from the emacs-27 release branch. Screenshot:

Screenshot from 2020-04-02 14-44-51

Note the different color of aio-all vs. aio-catch.

skeeto commented 4 years ago

Ah, I was looking at "aio-defun" not the function name itself. I understand now. I tweaked your commit slightly and merged as ae21bd6.