[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16155: 24.3.50;
From: |
Alan Mackenzie |
Subject: |
bug#16155: 24.3.50; |
Date: |
Sun, 15 Dec 2013 20:01:29 +0000 (UTC) |
User-agent: |
tin/1.9.6-20101126 ("Burnside") (UNIX) (FreeBSD/8.4-RELEASE (amd64)) |
Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Richard Stallman <rms@gnu.org> wrote:
>> I don't ever like having newline indent.
I agree. `newline' should never indent the new line. `newline-and-indent'
should always indent the new line.
>> It should be a minor mode,
> It is a minor mode. Called electric-indent-mode, and no enabled by default.
> See NEWS.
electric-indent-mode _is_ enabled by default in the current trunk. I've
just updated, built, and tried it.
>> and the documentation of `newline' should explain how to easily turn
>> this off.
> The docstring does mention the indentation behavior, with a link to
> electric-indent-mode.
What the docstring says is this:
A non-nil INTERACTIVE argument means to run the `post-self-insert-hook',
which by default will also indent the line (see `electric-indent-mode').
Presumably the invocation of `newline' by pressing the RET key leaves
INTERACTIVE set to nil. Nevertheless, the unwanted indentation happened.
This is bad documentation, since it describes the internal workings rather
than the coherent functionality. As a user of `newline', I shouldn't have
to know about `post-self-insert-hook', never mind having to try to figure
out which way to set INTERACTIVE.
I can't make out what that bit of the doc string means without a
considerable investment of intellectual effort.
Again, the question: why should `newline' indent when we've got the specific
command `newline-and-indent'? I think a good way to resolve the current
confusion would be to restrict electric-indent-mode to indenting ONLY the
line in which the character is typed, and leaving the indentation of any
new line to `newline-and-indent'.
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
- bug#16155: 24.3.50;, Richard Stallman, 2013/12/15
- bug#16155: 24.3.50;, Stefan Monnier, 2013/12/15
- Message not available
- bug#16155: 24.3.50;,
Alan Mackenzie <=
- bug#16155: 24.3.50;, Jarek Czekalski, 2013/12/15
- bug#16155: 24.3.50;, Stefan Monnier, 2013/12/16
- bug#16155: 24.3.50; electric indent gripes, Jarek Czekalski, 2013/12/16
- bug#16155: 24.3.50; electric indent gripes, Stefan Monnier, 2013/12/16
- Message not available
- bug#16155: 24.3.50; electric indent gripes, Alan Mackenzie, 2013/12/18
- bug#16155: 24.3.50;, Richard Stallman, 2013/12/17
- bug#16155: 24.3.50;, Drew Adams, 2013/12/17
- bug#16155: 24.3.50;, Josh, 2013/12/17
- bug#16155: 24.3.50;, Drew Adams, 2013/12/17
- bug#16155: 24.3.50;, Josh, 2013/12/21