From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: How to edit compilation-error-regexp-alist in .emacs file? Date: Mon, 16 Sep 2002 21:52:56 +0200 Organization: University of Dortmund, Germany Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032207372 3738 127.0.0.1 (16 Sep 2002 20:16:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 16 Sep 2002 20:16:12 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17r2Hz-0000y9-00 for ; Mon, 16 Sep 2002 22:16:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17r2IH-0004uK-00; Mon, 16 Sep 2002 16:16:29 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!213.73.101.75!eusc.inter.net!Informatik.Uni-Dortmund.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: lucy.cs.uni-dortmund.de Mail-Copies-To: never User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:T8phU9byjISsLI0cr3x4n/RdyYE= Original-Xref: nntp.stanford.edu gnu.emacs.help:104957 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1512 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1512 "Siegfried Heintze" 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)