From 793d044cac6a53d171691bb598095c2c2ca988dd Mon Sep 17 00:00:00 2001 From: moculus Date: Thu, 4 Dec 2008 00:30:01 +0000 Subject: [PATCH] --HG-- branch : pmacs2 --- mode/error.py | 4 +++- mode/perl.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mode/error.py b/mode/error.py index a9255bf..d3bd470 100644 --- a/mode/error.py +++ b/mode/error.py @@ -3,7 +3,7 @@ from method import Method import mode _error_regexes = [ - r'at (?P\S+) line (?P\d+)$', #perl + r'at (?P\S+) line (?P\d+)\.?$', #perl r'File "(?P.+?)", line (?P\d+)(?:, in \S+)?$', #python r'^(?P\S+?):(?P\d+): ', #javac/gcc r'at \S+\((?P.+?):(?P\d+)\)$', #java @@ -32,6 +32,8 @@ class ErrorGotoLine(Method): return errline = w.buffer.lines[y] path, line = m.group('file'), int(m.group('line')) + if path == '-': + path = w.buffer.orig_path b2 = a.open_path(path) a.switch_buffer(b2) a.methods['goto-line'].execute(b2.windows[0], lineno=line) diff --git a/mode/perl.py b/mode/perl.py index 969d4d7..6f62ff4 100644 --- a/mode/perl.py +++ b/mode/perl.py @@ -214,6 +214,8 @@ class PerlCheckSyntax(Method): args = ('perl', '-I', a.config.get('perl.lib', '.'), '-c', '-') retval = a.run_pipe(args, w.buffer, '*Perl-Syntax*', lambda x: x != 0, modename='error') + b = a.get_buffer_by_name('*Perl-Syntax*') + b.orig_path = w.buffer.path if retval == 0: a.set_error("Syntax OK") class PerlViewModulePerldoc(Method):