help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

correctly set compilation-error-regexp-alist in a mode


From: Florian Kaufmann
Subject: correctly set compilation-error-regexp-alist in a mode
Date: Wed, 08 Dec 2010 15:30:53 -0000
User-agent: G2/1.0

I am interested in your hints if the following is the right way to set
up compilation-error-regexp-alist-alist and compilation-error-regexp-
alist for my mode.

I never really understood why compilation-error-regexp-alist is a
list. When I am in a certain mode (python, java, ...) then I only care
about the compile errors of the current mode. Following that idea
compilation-error-regexp-alist would always contain only one element,
i.e. it doesn't make sense to me that it is a list.

(define-derived-mode adoc-mode text-mode "adoc"
  ...
  (add-to-list
   'compilation-error-regexp-alist-alist
               '(asciidoc
                 "^asciidoc: +\\(?:ERROR\\|\\(WARNING\\|DEPRECATED\\)\
\): +\\([^:\n]*\\): line +\\([0-9]+\\)"
                 2 3 nil (1 . nil)))
  (make-local-variable 'compilation-error-regexp-alist)
  (setq compilation-error-regexp-alist '(asciidoc))
  ...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]