From 4b95427244d3866afe1e723079e11ed2359eb552 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Fri, 10 Aug 2018 13:37:13 +0900 Subject: [PATCH] Move code --- emacs.el | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/emacs.el b/emacs.el index f56abe5..efbe3cf 100644 --- a/emacs.el +++ b/emacs.el @@ -748,6 +748,17 @@ found, otherwise returns nil." ;; Include some extra modes (require 'generic-x) +(autoload-eval-lazily 'compile nil + (require 'ansi-color) + (add-hook 'compilation-filter-hook + (lambda () + (let ((inhibit-read-only t)) + (ansi-color-apply-on-region compilation-filter-start + (point))))) + (add-to-list 'compilation-error-regexp-alist + ;; ansible-lint + '("^\\([^ \n]+\\):\\([0-9]+\\)$" 1 2))) + ;; Workaround to avoid ensime error (defvar ensime-mode-key-prefix nil) @@ -1552,16 +1563,4 @@ This mode is a simplified version of `adoc-mode'." (buffer-substring-no-properties (point-min) (point-max)))) )) - -(require 'ansi-color) -(require 'compile) -(add-hook 'compilation-filter-hook - (lambda () - (let ((inhibit-read-only t)) - (ansi-color-apply-on-region compilation-filter-start - (point))))) -(autoload-eval-lazily 'compile nil - (add-to-list 'compilation-error-regexp-alist - ;; ansible-lint - '("^\\([^ \n]+\\):\\([0-9]+\\)$" 1 2))) ;;; emacs.el ends here