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

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

Re: In emacs 23 compile-mode doesn't recognize (c)perl error messages


From: LanX
Subject: Re: In emacs 23 compile-mode doesn't recognize (c)perl error messages
Date: Thu, 15 Oct 2009 08:52:40 -0700 (PDT)
User-agent: G2/1.0

Sorry again, better take this setup, the last one had an experimental
twistfor marking the severity as "info".

It's now more anal, but works with and without disgnostics, if you
have mode-compile in your load path you don't need the -l option.

------------------------------------------------------------------------------------------
lanx@nc10-ubuntu:~$ cat .emacs
(autoload 'mode-compile "mode-compile"
  "Command to compile current buffer file based on the major mode" t)

(defvar cperl-compilation-error-regexp-alist
  ;; This look like a paranoiac regexp: could anybody find a better
one? (which WORKS).
  '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\)\\( \\|\n\t\\)line \\
([0-9]+\\)[\\., \n]"
     2 4 )
   )
  "Alist that specifies how to match errors in perl output.")

(if (fboundp 'eval-after-load)
    (eval-after-load
        "mode-compile"
      '(setq perl-compilation-error-regexp-alist
             cperl-compilation-error-regexp-alist)))
lanx@nc10-ubuntu:~$ cat error.pl
use strict;
use diagnostics;

my $a=A;
my $a=B;
$b=B;

lanx@nc10-ubuntu:~$ emacs error.pl -f cperl-mode -l /home/
lanx/.emacs.d/debug/mode-compile.el -f mode-compile
------------------------------------------------------------------------------------------


reply via email to

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