aboutsummaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2019-02-26 01:16:04 -0800
committerGravatar Tom Willemse2019-02-26 01:16:04 -0800
commitd0ded59e4906d47a136608a4f70970327421c0a4 (patch)
tree715324af125a07a4e84211bcd1db0f23d9569a20 /emacs
parent2ddcd487e0e83b5e40a9f0f2c243975b74029e16 (diff)
downloadnew-dotfiles-d0ded59e4906d47a136608a4f70970327421c0a4.tar.gz
new-dotfiles-d0ded59e4906d47a136608a4f70970327421c0a4.zip
Move Compile mode configuration to emacs-config
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.el1
-rw-r--r--emacs/.emacs.d/init/oni-compilation-init.el72
2 files changed, 0 insertions, 73 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index 4f11472..983c1d5 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -162,7 +162,6 @@
;; (propertize (concat " " (char-to-string #xf233))
;; 'face '(:family "Font Awesome" :height 0.75))))
-(with-eval-after-load 'compile (load "oni-compilation-init"))
(with-eval-after-load 'dired (load "oni-dired-init"))
(with-eval-after-load 'ediff (load "oni-ediff-init"))
(with-eval-after-load 'elec-pair (load "oni-elec-pair-init"))
diff --git a/emacs/.emacs.d/init/oni-compilation-init.el b/emacs/.emacs.d/init/oni-compilation-init.el
deleted file mode 100644
index 44b45e7..0000000
--- a/emacs/.emacs.d/init/oni-compilation-init.el
+++ /dev/null
@@ -1,72 +0,0 @@
-;;; oni-compilation-init.el --- Compilation mode configuration -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2018 Tom Willemse
-
-;; Author: Tom Willemse <tom@ryuslash.org>
-;; Keywords: local
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; My configuration for compilation mode.
-
-;;; Code:
-
-(require 'compile)
-(require 'shackle)
-(require 'subr-x)
-
-(setq compilation-scroll-output t)
-
-(defun oni-compilation-init--maybe-dont-show-window (buffer-or-name alist plist)
- "Don't show BUFFER-OR-NAME unless it absolutely must.
-
-ALIST and PLIST contain extra information about the buffer."
- (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))))
-
-(defun oni-compilation-init--maybe-display-compilation-window (buffer status)
- "Display BUFFER if STATUS is not finished."
- (unless (string= (string-trim status) "finished")
- (display-buffer buffer)))
-
-(defun oni-compilation-init--ansi-color-for-compilation-filter ()
- "Apply ANSI terminal escape codes to compilation output."
- (ansi-color-apply-on-region compilation-filter-start (point)))
-
-(defun oni-compilation-init--compilation-finish-notify-function (buffer status)
- "Show an alert of the status of the compliation.
-
-BUFFER is the `compilation-mode' buffer and STATUS is the exit
-status of the process."
- (when (string= (buffer-name buffer) "*compilation*")
- (if (string= (string-trim status) "finished")
- (alert "Compilation finished succesfully")
- (alert "Compilation finished with an error"))))
-
-(add-to-list 'shackle-rules
- '(compilation-mode :custom oni-compilation-init--maybe-dont-show-window
- :fallback shackle-display-buffer
- :other t :select t))
-
-(add-hook 'compilation-filter-hook #'oni-compilation-init--ansi-color-for-compilation-filter)
-(add-hook 'compilation-finish-functions #'oni-compilation-init--maybe-display-compilation-window)
-(add-hook 'compilation-finish-functions #'oni-compilation-init--compilation-finish-notify-function)
-
-
-(provide 'oni-compilation-init)
-;;; oni-compilation-init.el ends here