diff options
author | 2018-07-09 18:40:44 -0700 | |
---|---|---|
committer | 2018-07-09 18:40:44 -0700 | |
commit | d5a65ee24f2ea631670d061eba03ab39f0c15685 (patch) | |
tree | 70247738672c90175f55867fba1ca87a6f892dec /emacs/.emacs.d/init/oni-compilation-init.org | |
parent | dc6f85c2cb72d00aaf523e8b724db38ca70a386a (diff) | |
download | new-dotfiles-d5a65ee24f2ea631670d061eba03ab39f0c15685.tar.gz new-dotfiles-d5a65ee24f2ea631670d061eba03ab39f0c15685.zip |
Move compilation configuration to separate file
Also add functions from my Windows configuration.
Diffstat (limited to 'emacs/.emacs.d/init/oni-compilation-init.org')
-rw-r--r-- | emacs/.emacs.d/init/oni-compilation-init.org | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/emacs/.emacs.d/init/oni-compilation-init.org b/emacs/.emacs.d/init/oni-compilation-init.org deleted file mode 100644 index 162f7d2..0000000 --- a/emacs/.emacs.d/init/oni-compilation-init.org +++ /dev/null @@ -1,41 +0,0 @@ -#+TITLE: Compilation mode configuration - -#+BEGIN_SRC emacs-lisp - (require 'compile) - (require 'shackle) - (require 'subr-x) -#+END_SRC - -Scroll output in compilation mode. - -#+BEGIN_SRC emacs-lisp - (setq compilation-scroll-output t) -#+END_SRC - -Don't show the compilation window when compilation starts. - -#+BEGIN_SRC emacs-lisp - (defun oni:maybe-dont-show-window (buffer-or-name alist plist) - "Don't show BUFFER-OR-NAME unless it absolutely must." - (if (alist-get 'allow-no-window alist) - buffer-or-name - (funcall (plist-get plist :fallback) buffer-or-name alist - (plist-put (copy-sequence plist) :custom nil)))) - - (add-to-list 'shackle-rules - '(compilation-mode :custom oni:maybe-dont-show-window - :fallback shackle-display-buffer - :other t :select t)) -#+END_SRC - -Show the compilation window when compilation has finished with a -non-zero exit status. - -#+BEGIN_SRC emacs-lisp - (defun oni:maybe-display-compilation-window (buffer status) - "Display BUFFER if STATUS is not finished." - (unless (string= (string-trim status) "finished") - (display-buffer buffer))) - - (add-hook 'compilation-finish-functions #'oni:maybe-display-compilation-window) -#+END_SRC |