diff options
author | Franck Cuny <franckcuny@gmail.com> | 2016-05-24 20:06:59 -0700 |
---|---|---|
committer | Franck Cuny <franckcuny@gmail.com> | 2016-05-24 20:06:59 -0700 |
commit | fd1b1a7316ae8a9fa4e1aa0110317b75a319aa20 (patch) | |
tree | f6544abd629ddd03c7c972d26601f8e718c704fa /emacs.d | |
parent | [emacs] Name of the scala package has changed. (diff) | |
download | emacs.d-fd1b1a7316ae8a9fa4e1aa0110317b75a319aa20.tar.gz |
[emacs] open magit in full screen.
I prefer to have magit in full screen instead of having a new buffer to pop up.
Diffstat (limited to '')
-rw-r--r-- | emacs.d/core/core-git.el | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/emacs.d/core/core-git.el b/emacs.d/core/core-git.el index 7044367..a695def 100644 --- a/emacs.d/core/core-git.el +++ b/emacs.d/core/core-git.el @@ -25,7 +25,22 @@ :ensure t :defer t) -(provide 'core-git) +;; run magit in full screen +;; http://www.lunaryorn.com/2016/04/28/fullscreen-magit-status.html +(add-to-list 'display-buffer-alist + `(,(rx "*magit: ") + (fcuny/display-buffer-fullframe) + (reusable-frames . nil))) + +(defun fcuny/display-buffer-fullframe (buffer alist) + "Display BUFFER in fullscreen. +ALIST is a `display-buffer' ALIST. +Return the new window for BUFFER." + (let ((window (display-buffer-pop-up-window buffer alist))) + (when window + (delete-other-windows window)) + window)) +(provide 'core-git) |