Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode

From: Glenn Morris <[email-masked]>
Date: Tue, 01 Jul 2014 21:51:06 -0400

Stefan Monnier wrote:

> Instead, the problem here seems to only affect empty lines (i.e. lines
> where the text hasn't been written yet)

(How do you type RET and have text already written on the new line...?)

> , and this problem affects many/most modes.

Oh duh, of course.

if foo; then
   ...
   ... when will endif appear...
   ... who knows...
   endif  # oh here it is

> But I guess if the first non-whitespace char is a capital C,
> fortran-mode has a similar problem to python-mode in that it can't know
> for sure if the line should be assumed to be a comment (and go to
> column-0) or to be some instruction that happens to start with a capital
> C (and should go to some further column).

Yep. (CHARACTER for example.)

So I don't really see that there is anything to do here.