emacs-devel
[Top][All Lists]
Advanced

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

Re: Dealing with "gnu" rule in compilation-error-regexp-alist


From: Wilson Snyder
Subject: Re: Dealing with "gnu" rule in compilation-error-regexp-alist
Date: Thu, 15 Apr 2010 11:26:14 -0400 (EDT)

>address@hidden (Wilson Snyder) writes:
>
>> (setq compilation-error-regexp-alist-alist
>>       (append
>>        '((percent "%?\\(Error\\|Warning\\):[\n ]*\\([^ 
>> \t:]+\\):\\([0-9]+\\):" 2 3))
>>        compilation-error-regexp-alist-alist))
>> ;; Ok
>> (setq compilation-error-regexp-alist '(percent))
>> (compile "echo 'zz: %Error: foo.x:1: something'")
>> (compile "echo '%Error: foo.x:1: something'")
>> ;; Bad
>> (setq compilation-error-regexp-alist '(percent gnu))
>> (compile "echo 'zz: %Error: foo.x:1: something'")
>
>You need to anchor your regexp at the start of the line.  For example,
>
>   "^[^%\n]*%?\\(Error\\|Warning\\):[\n ]*\\([^ \t:]+\\):\\([0-9]+\\):" 2 3))

Unfortunately I had already tried that.  It looks better for
the example I sent but doesn't solve more complicated
patterns.

>> Long term, I think it would be good have some sort of
>> ordering or priority to the rules.
>
>This is already the case.

Can you describe how to use it then?  Sorry I missed it - I
followed the code and it seems to just do a mapcar to build
the font-lock list and always uses 'append, so font-lock
will keep processing.

-Wilson




reply via email to

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