diff options
author | Amin Bandali <amin@gnu.org> | 2018-08-30 18:00:57 -0400 |
---|---|---|
committer | Amin Bandali <amin@gnu.org> | 2018-08-30 18:00:57 -0400 |
commit | 165ca2689bd2b2fa20ce7015b5663106fd8ced46 (patch) | |
tree | aec9fbecd34386d3903e5c0bb604fd60f4439128 | |
parent | dc8184b76bc10716a8f7b442559bc03df453e967 (diff) | |
download | configs-165ca2689bd2b2fa20ce7015b5663106fd8ced46.tar.gz configs-165ca2689bd2b2fa20ce7015b5663106fd8ced46.tar.xz configs-165ca2689bd2b2fa20ce7015b5663106fd8ced46.zip |
[emacs] move *compilation* auto-close to own section under Defaults
Diffstat (limited to '')
-rw-r--r-- | init.org | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -608,6 +608,20 @@ Enable =winner-mode=. (winner-mode 1) #+end_src +*** Close =*compilation*= on success + +#+begin_src emacs-lisp +(setq compilation-exit-message-function + (lambda (status code msg) + "Close the compilation window if successful." + ;; if M-x compile exits with 0 + (when (and (eq status 'exit) (zerop code)) + (bury-buffer) + (delete-window (get-buffer-window (get-buffer "*compilation*")))) + ;; return the result of compilation-exit-message-function + (cons msg code))) +#+end_src + ** Bindings #+begin_src emacs-lisp @@ -712,16 +726,6 @@ file. (add-to-list 'safe-local-variable-values '(eval add-hook 'after-save-hook #'amin/async-babel-tangle 'append 'local)) - -(setq compilation-exit-message-function - (lambda (status code msg) - "Close the compilation window if successful." - ;; if M-x compile exits with 0 - (when (and (eq status 'exit) (zerop code)) - (bury-buffer) - (delete-window (get-buffer-window (get-buffer "*compilation*")))) - ;; return the result of compilation-exit-message-function - (cons msg code))) #+end_src *** [[https://magit.vc/][Magit]] |