When you’re writing or coding, you want to remove as many distractions
as possible. In addition to obvious things like shutting down you
email, IM and twitter clients, it can be helpful to put your editor in
full-screen mode. This way, the editor is the only thing visible, so
your attention isn’t drawn to menu bars, flashing notifications or
bouncing dock icons.

To create a shortcut for fullscreen mode in emacs, put this in your
~/.emacs file: