[multi-frame] Use macros to deal with new frames

master
Jacopo De Simoi 10 months ago
parent 35609c5343
commit 85ca77026a
  1. 12
      global.org

@ -634,6 +634,13 @@
#+begin_src emacs-lisp
(setq echo-keystrokes 0.10)
#+end_src
** frame helpers
#+begin_src emacs-lisp
(defmacro with-new-frame (&rest body)
`(with-selected-frame (make-frame) ,@body))
(defmacro eval-with-new-frame (&rest body)
`(lambda () (interactive) (with-new-frame ,@body)))
#+end_src
** Disable completion buffer
Remove the completion buffer as soon as we get out of the minibuffer
#+begin_src emacs-lisp
@ -793,7 +800,7 @@
(require 'mu4e)
(require 'helm-mu)
(global-set-key (kbd "C-x μ") 'mu4e)
(global-set-key (kbd "C-x 5 μ") (lambda () (interactive) (select-frame (make-frame) (mu4e))))
(global-set-key (kbd "C-x 5 μ") (eval-with-new-frame (mu4e)))
(defalias 'μ 'mu4e)
@ -3056,8 +3063,7 @@
#+begin_src emacs-lisp
(require 'magit)
(global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-x 5 g") (lambda () (interactive) (select-frame (make-frame)) (magit-status) (delete-other-windows)))
(global-set-key (kbd "C-x 5 g") (eval-with-new-frame (magit-status) (delete-other-windows)))
#+end_src
Customize the sections in ~magit-status~ by adding modules overview
and untracked files.

Loading…
Cancel
Save