unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Glenn Morris <rgm@gnu.org>
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 21:17:47 -0400	[thread overview]
Message-ID: <jwv61jgftv6.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <cztx70ir9b.fsf@fencepost.gnu.org> (Glenn Morris's message of "Tue, 01 Jul 2014 19:38:40 -0400")

> Other modes, such as Python, have similar issues.

Actually, I think it's different: the problem with Python is that even
once the line is fully written, python-mode can't always decide where to
indent it, because there are several valid choices (and they don't mean
the same thing).

Instead, the problem here seems to only affect empty lines (i.e. lines
where the text hasn't been written yet), and this problem affects
many/most modes.

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).

> or: RET $ TAB

And adding $ to electric-indent-chars would even save you from typing
this TAB (which doesn't mean that's what fortran-mode should do, tho.
I have the impression that this kind of old-style Fortran is fairly rare
nowadays).


        Stefan





  reply	other threads:[~2014-07-02  1:17 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
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 [this message]
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=jwv61jgftv6.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=17895@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    --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).