unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Roland Winkler <winkler@gnu.org>, 17895@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <uymwcsiqr9.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <jwvbnt8g0mu.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Tue, 01 Jul 2014 18:47:33 -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!)





  reply	other threads:[~2014-07-01 23:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01 21:31 bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode Roland Winkler
2014-07-01 22:47 ` Stefan Monnier
2014-07-01 23:49   ` Glenn Morris [this message]
2014-07-02 20:55     ` Roland Winkler
2014-07-02 21:03       ` Glenn Morris
2014-07-02 21:50         ` Roland Winkler
2014-07-03  2:00           ` Stefan Monnier
2014-07-01 23:38 ` Glenn Morris
2014-07-02  1:17   ` Stefan Monnier
2014-07-02  1:51     ` Glenn Morris
2014-07-02  1:57       ` Glenn Morris
2014-07-02  2:14       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uymwcsiqr9.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=17895@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=winkler@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).