John Ciolfi and I looked at your example.  You are missing a close ].   See the 
arrow I added below to your code snippet.

I'm thinking that adding highlighting to keywords inside a [ ] block might be a 
useful feature to make this more clear.  Not sure how much that would slow 
things down as detecting that is probably expensive.

Eric

-----Original Message-----
From: Uwe Brauer [mailto:o...@mat.ucm.es] 
Sent: Monday, February 05, 2018 4:23 PM
To: Eric Ludlam <eric.lud...@mathworks.com>
Cc: Uwe Brauer <o...@mat.ucm.es>; matlab-emacs-discuss 
<matlab-emacs-discuss@lists.sourceforge.net>
Subject: Re: [Matlab-emacs-discuss] indention stopped working?

>>> "Eric" == Eric Ludlam <eric.lud...@mathworks.com> writes:

Hi Eric

Thanks 
> Your examples work for me , but I don't have Emacs 27.

I tried out Emacs 26, same problem, I deactivated any auto-fill function.

> The only thing I can think of is some sort of auto-fill behavior is 
> going off, but that seems unlikely with just an indent-region.


What is strange is the following

If the file just contains

for k=1:N+1
x(k+1)=x(k)+h;
y(k+1)=f(x(k+1));
z(k+1)=g(x(k+1));
end

Then indent-region does the right thing

But if the file has
f=@(x)[x*exp(-x)];
g=@(x)[exp(-x^2);  <----------------
for k=1:N+1
x(k+1)=x(k)+h;
y(k+1)=f(x(k+1));
z(k+1)=g(x(k+1));
end

Then the indent-region function acts in a bizarre way. Can somebody please 
confirm this?


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Matlab-emacs-discuss mailing list
Matlab-emacs-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss

Reply via email to