branch : pmacs2
This commit is contained in:
moculus 2008-12-04 00:30:01 +00:00
parent aa07f83509
commit 793d044cac
2 changed files with 5 additions and 1 deletions

View File

@ -3,7 +3,7 @@ from method import Method
import mode import mode
_error_regexes = [ _error_regexes = [
r'at (?P<file>\S+) line (?P<line>\d+)$', #perl r'at (?P<file>\S+) line (?P<line>\d+)\.?$', #perl
r'File "(?P<file>.+?)", line (?P<line>\d+)(?:, in \S+)?$', #python r'File "(?P<file>.+?)", line (?P<line>\d+)(?:, in \S+)?$', #python
r'^(?P<file>\S+?):(?P<line>\d+): ', #javac/gcc r'^(?P<file>\S+?):(?P<line>\d+): ', #javac/gcc
r'at \S+\((?P<file>.+?):(?P<line>\d+)\)$', #java r'at \S+\((?P<file>.+?):(?P<line>\d+)\)$', #java
@ -32,6 +32,8 @@ class ErrorGotoLine(Method):
return return
errline = w.buffer.lines[y] errline = w.buffer.lines[y]
path, line = m.group('file'), int(m.group('line')) path, line = m.group('file'), int(m.group('line'))
if path == '-':
path = w.buffer.orig_path
b2 = a.open_path(path) b2 = a.open_path(path)
a.switch_buffer(b2) a.switch_buffer(b2)
a.methods['goto-line'].execute(b2.windows[0], lineno=line) a.methods['goto-line'].execute(b2.windows[0], lineno=line)

View File

@ -214,6 +214,8 @@ class PerlCheckSyntax(Method):
args = ('perl', '-I', a.config.get('perl.lib', '.'), '-c', '-') args = ('perl', '-I', a.config.get('perl.lib', '.'), '-c', '-')
retval = a.run_pipe(args, w.buffer, '*Perl-Syntax*', lambda x: x != 0, retval = a.run_pipe(args, w.buffer, '*Perl-Syntax*', lambda x: x != 0,
modename='error') modename='error')
b = a.get_buffer_by_name('*Perl-Syntax*')
b.orig_path = w.buffer.path
if retval == 0: a.set_error("Syntax OK") if retval == 0: a.set_error("Syntax OK")
class PerlViewModulePerldoc(Method): class PerlViewModulePerldoc(Method):