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

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

Re: How to edit compilation-error-regexp-alist in .emacs file?


From: Kai Großjohann
Subject: Re: How to edit compilation-error-regexp-alist in .emacs file?
Date: Mon, 16 Sep 2002 21:52:56 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

"Siegfried Heintze" <address@hidden> writes:

> When I put the following in my .emacs fail, I get an error. This is probably
> because the necessary modules have not been loaded yet.
>
> How do I automatically execute these statements after the necessary modules
> have been loaded?
>
> (setcar (car compilation-error-regexp-alist) (concat "\\(\\[Error\\]
> \\|\\[Fatal Error\\] \\)?"  (caar compilation-error-regexp-alist)))
>   (setcdr (car compilation-error-regexp-alist) '(3 4 7))

This is better style:

(add-to-list 'compilation-error-regexp-alist
             '("your-regexp-here" 3 4 7))

Before that, you might need (require 'compile), or you need to put the
add-to-list statement in a hook, or in an eval-after-load.  The
require statement is simplest, at the cost of some Emacs startup time.

kai
-- 
~/.signature is: umop 3p!sdn    (Frank Nobis)


reply via email to

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