GNU bug report logs - #17895
24.3.91; electric-indent-mode not quite right with comments in fortran-mode

Previous Next

Package: emacs;

Reported by: "Roland Winkler" <winkler <at> gnu.org>

Date: Tue, 1 Jul 2014 21:32:01 UTC

Severity: minor

Tags: wontfix

Found in version 24.3.91

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 17895 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Roland Winkler <winkler <at> gnu.org>, 17895 <at> debbugs.gnu.org
Subject: Re: bug#17895: 24.3.91;
 electric-indent-mode not quite right with comments in fortran-mode
Date: Tue, 01 Jul 2014 19:49:30 -0400
Stefan Monnier wrote:

> [ Don't know enough about Fortran to know what is "insert a multiline
>   comment" in this context

AFAIK, there is no such thing as "multiline comments" in Fortran.
I assume he means he has typed:

C this is a comment

Then he presses RET and wants to write more comments, but point gets
indented to column 6 instead. It's impossible for Fortran mode to know
if he was going to write code (column 6) or a comment (column 0). I
could say the same thing about pressing RET after a code line.

> neither do I know what is a "multiline statement" or why it would
> "require fortran-continuation-string"

If you want to write a continued code line, you put eg a "$" in column 5
of the new line. There's no marker in the previous line, so again it is
impossible for Fortran mode to know that's what you intend when you
press RET.

> Maybe a way to fix this problem, then, would be to make fortran's
> indent-line-function indent to column 0 when called on an empty line in
> one of those contexts.

It is impossible for it to know, as I hopefully explain above.


I really don't think that Fortran mode can do anything here.
The new behavior is different to the old one, but I think it will be a
net win in terms of fewer keypresses in most situations.


(Everyone should use free-format Fortran, where these problems were all
solved 20+ years ago!)




This bug report was last modified 9 years and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.