Forked from mads-hartmann/toggle-maximize-buffer.el
Created
November 9, 2020 04:12
-
-
Save shanff/c2bae7b6bb35894ecec6e2e01862757f to your computer and use it in GitHub Desktop.
An Emacs function to temporarily make one buffer fullscreen. You can quickly restore the old window setup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun toggle-maximize-buffer () "Maximize buffer" | |
| (interactive) | |
| (if (= 1 (length (window-list))) | |
| (jump-to-register '_) | |
| (progn | |
| (set-register '_ (list (current-window-configuration))) | |
| (delete-other-windows)))) | |
| ;; Bind it to a key. | |
| ;; (global-set-key [(super shift return)] 'toggle-maximize-buffer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment