[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17895: 24.3.91; electric-indent-mode not quite right with comments i
From: |
Stefan Monnier |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
> 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
bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode, Glenn Morris, 2014/07/01
- bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode,
Stefan Monnier <=