Emacs Compiling

Hi,
i have just starded watching the Handmade Hero Series. I wanted to set up my stuff exactly as Casey did and there ist just one thing left. How do i compile the Code directly in Emacs. If i type in the command compile it always starts visual studio. Or did he set up a hotkey to do so? I think he doesnt mentioned it in the "Emacs Tutorial" video.
You need to bind a command to something like

1
(compile "build.bat")


so it will run the Handmade Hero build.bat script.

- Casey
Thank you!
If anyone has the same problem, I added this to the .emacs file:

1
2
3
4
5
6
7
(defun compile-it ()
  "Make the current build."
  (interactive)
  (compile casey-makescript)
  (other-window 1))

(define-key global-map [f9] 'compile-it )

But don´t ask me what this exactly does. I just c/p it of the other code in the .emacs file and changed stuff until it worked.
Heeiiigou
But don´t ask me what this exactly does. I just c/p it of the other code in the .emacs file and changed stuff until it worked.

That is basically how I built my entire .emacs file :P

- Casey