Actually, Emacs might be handling it pretty well. Safe eval of local variables is a thing. Of course, in your own code, anything goes.