I have noticed a small problem in the recognition of comments.  I can use M-; 
to insert a comment on the current line.  I should be able to use the same 
command to move point to an existing comment on the current line, with the side 
effect of moving that comment to the preferred start column.  Actually that 
does work if the comment starts with "% ", but fails if the percent is followed 
by something other than a space.

Suppose I am editing this file with point anywhere on the third line:

function foo
a = 3;
b = 4;         %first comment
c = 5;
d = 6;
e = 7;         % second comment
f = 8;

If I press M-; I get:

function foo
a = 3;
b = 4;         %first comment
c = 5;
d = 6;
e = 7;                                  % second comment
f = 8;

With point on any other line, I get the expected result.

I expect this could be fixed by adjusting a regular expression, but I could not 
follow the logic well enough to find it.


-          Jim Van Zandt
------------------------------------------------------------------------------
_______________________________________________
Matlab-emacs-discuss mailing list
Matlab-emacs-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss

Reply via email to