Set compilation-error-regexp-alist after loading 'compile.el'.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 19 Jan 2011 12:15:48 +0200
changeset 552 1cdd21e5f0b9
parent 551 4e3276dbad80
child 553 5d10932ca9c0
Set compilation-error-regexp-alist after loading 'compile.el'.
.emacs-my
--- a/.emacs-my	Wed Jan 19 11:31:52 2011 +0200
+++ b/.emacs-my	Wed Jan 19 12:15:48 2011 +0200
@@ -1125,12 +1125,13 @@
 ;; compilation window shall scroll down if not 0
 (setq compilation-scroll-output 1)
 
-;; My funny error messages.
-;; XXX нужно реализовать через hook.
-(require 'compile)
-(add-to-list 'compilation-error-regexp-alist '("^\\( +\\[csc\\] \\|\\)\\(.*\\)(\\([0-9]*\\),\\([0-9]*\\)):" 2 3 4))
-(add-to-list 'compilation-error-regexp-alist '("^ *\\(.*\\)(\\([0-9]*\\)) +:" 1 2))
-(add-to-list 'compilation-error-regexp-alist '("^\"?\\([^\"]*\\)\"?,\\([0-9]*\\) .*\\[.*\\]: " 1 2)) ; KEIL compiler
+(eval-after-load 'compile
+  ;; My funny error messages.
+  (add-to-list 'compilation-error-regexp-alist '("^\\( +\\[csc\\] \\|\\)\\(.*\\)(\\([0-9]*\\),\\([0-9]*\\)):" 2 3 4))
+  (add-to-list 'compilation-error-regexp-alist '("^ *\\(.*\\)(\\([0-9]*\\)) +:" 1 2))
+  (add-to-list 'compilation-error-regexp-alist '("^\"?\\([^\"]*\\)\"?,\\([0-9]*\\) .*\\[.*\\]: " 1 2)) ; KEIL compiler
+  )
+
 ;; (add-to-list 'compilation-mode-font-lock-keywords '("\\(/[Oo][Uu][Tt]:[^ 	]+\\)" . 1))
 ;; (add-to-list 'compilation-mode-font-lock-keywords '("[ 	]\\(/F[oe][^ 	]+\\)" . 1))