I can't really help you with emacs, but if you're trying to use it just to follow handmade hero, know that Casey switched to 4coder and it's probably better to go with that directly (or any other editor you like) than to use emacs.
There are a few articles about how to use 4coder custom layer here https://4coder.handmade.network/forums/articles
If you need more help probably the better place is the 4coder discord https://discord.com/invite/NQEdQSU or in the 4coder sub forums https://4coder.handmade.network/forums
A final note is that 4coder is now open source and I don't know if there is a proper location to get the latest update (there might not be updates yet as the open source part is quite recent, but the original author will most likely not update it themself in the future).