Set compilation-error-regexp-alist after loading 'compile.el'.
--- 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))