I am using the octave major mode for editing my MATLAB code, since it is more convenient than the unsupported MATLAB packages for emacs on the internet.
One downside is whenever I try to auto-indent commented lines, the comment character is carried over to column 32, which makes indenting large blocks of code a bit of a problem.
I should note that I did
(setq comment-start "%")
in order to use the percent sign as the default comment character. Nevertheless, I have the same problem when using #. When I use comment-region, it actually inserts ## at the beginning of the lines, and the lines with ## do not shoot off like the ones with #.
The same question has been asked couple of times as I have found on Google, like this one. But none of them helped me.
I would like to solve this problem so that lines starting with % or # are auto-indented in a correct manner without shooting off to column 32. I am using GNU Emacs 24.5.1.