On Tue, Jun 7, 2011 at 5:25 PM, <rp...@gm...> wrote:
> On Tue, Jun 7, 2011 at 4:38 PM, Daniele Nicolodi <da...@gr...> wrote:
>> On 07/06/11 15:06, rp...@gm... wrote:
>>> Hello everyone,
>>>
>>> I noticed that when I insert a commented line right after the
>>> 'methods'-statement in a class definition, the indentation fails
>>> (starting at the comment, the indentation is reset to the beginning of
>>> the line).
>>
>> Hello,
>>
>> I fixed a couple of bugs regarding comments indentation, especially help
>> strings, in my copy of matlab-mode (I haven't found the time yet to send
>> patches upstream).
>>
>> I'm not sure I following your description. Can you please provide a
>> simple example of the problem you are experiencing, including the
>> indentation you obtain from matlab-mode and the desired one?
>>
>> The solution should not be too difficult and I may found the time to
>> look at it soon.
>>
>> Cheers,
>> --
>> Daniele
>>
>
> Hi Daniele,
>
> thanks for your help. What I would like to see is the following:
>
> classdef myclass
> methods
> %> comment style I use
> function some = function(thing)
> some = thing
> end
> end
> end
>
> what I get is this:
>
> classdef myclass
> methods
> %> comment is indented to beginning of line
> function some = function(thing)
> % but relative indentation in class still works
> some = thing
> end
> end
> end
>
> This reproduces *most* of the time, but not always. I just came to
> think that the issue might be that these files originally come from a
> windows machine and this actually might be a
> carriage-return-problem...
>
> best
> Hans
>
I looked into the problem of different line endings on windows & linux
- however, the problem appears also on files generated on linux. The
problem must thus lie with matlab.el. Note that I have only observed
this with the methods-keyword - comments+indentation after the
properties-keyword work perfectly fine.
Hans
|