Skip to content

Instantly share code, notes, and snippets.

@nominolo
Created May 20, 2011 16:54
Show Gist options
  • Save nominolo/983312 to your computer and use it in GitHub Desktop.
Save nominolo/983312 to your computer and use it in GitHub Desktop.
Fullscreen on Mac Emacs
;; This works with Carbon Emacs 2010
(defun mac-toggle-max-window ()
(interactive)
(set-frame-parameter nil 'fullscreen
(if (frame-parameter nil 'fullscreen)
nil
'fullboth)))
;; Now bind it to a key (e.g., Mac+Meta+Return)
(global-set-key [(meta super return)] 'mac-toggle-max-window)
;; On Emacs 23.3 you need a version with a patch (e.g., install via homebrew)
(global-set-key [(meta alt return)] 'ns-toggle-fullscreen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment