Hi Xavier,
For me, block comments work ok as long as they are not part of the first block of comments. Basically, the indentation engine doesn't know when the line that doesn't s tart with % is part of a comment or not.
I attached a patch that makes the basic indentation for this case work, but I'll guess it will have performance implications. It will take some more effort to make sure indentation performance doesn't get too broken.
Thanks
Eric
-----Original Message-----
From: Xavier Raynaud [mailto:xav...@gm...]
Sent: Wednesday, May 08, 2013 4:52 AM
To: mat...@li...
Subject: [Matlab-emacs-discuss] percent-brace
Matlab gives the possibility to insert comments which span several lines inside percent-brace %{ %}
It seems that matlab-emacs does not handle correctly indentation when this feature is used. Here is an example:
function y= f(x)
% first comment
%{
second comment: induces unwanted indentation.
%}
% Third comment
y=x
end
This indentation does not correspond to the one produced by the matlab editor. I wonder if this is something that could be easily changed.
When writing code with others, it is important to have same indentation policy and matlab own editor then sets the standard.
Thank you for your help.
Xavier Raynaud.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Matlab-emacs-discuss mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss
|