matlab-shell.el:

(matlab-shell-scan-for-error): Some errors might
be indented, so don't underline the spaces in front.

tests/buggy.m:
Add example indented error.
This commit is contained in:
Eric Ludlam 2019-12-13 09:01:59 -05:00
parent fb19b6bcc1
commit 2e8905b59d
2 changed files with 14 additions and 1 deletions

View file

@ -728,7 +728,9 @@ Returns a list of the form:
limit
t)
(save-excursion
(setq beginning (match-beginning 0))
(setq beginning (save-excursion (goto-char (match-beginning 0))
(back-to-indentation)
(point)))
(goto-char (match-end 0))
(dolist (EXP matlab-shell-error-location-expression)
(when (looking-at EXP)

View file

@ -24,6 +24,17 @@ function buggy(input,n)
buggy('stack',n-1);
end
case 'indented'
% Test errors that are captured, but then reported up
% but indented.
disp(' In buggy.m (TestPoint_foo) at 36')
end
end
function TestPoint_foo
message('A test point');
end