[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC
From: |
David Kastrup |
Subject: |
Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478. |
Date: |
Mon, 24 Mar 2014 18:29:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
>> From: Dmitry Gutov <address@hidden>
>> Date: Mon, 24 Mar 2014 11:08:43 +0200
>> Cc: Alan Mackenzie <address@hidden>, Stefan <address@hidden>,
>> address@hidden
>>
>> FWIW, effectively doing `reindent-then-newline-and-indent' on RET also
>> seems gratuitous to me. When I reach the end of a line, usually text on
>> that line is already indented correctly (automatically, or through me
>> typing TAB manually), so the first `reindent' does nothing, unless the
>> indentation function was wrong about the current line in the first
>> place, and I had to adjust it manually.
>
> This might be mostly true, but not always. E.g., what if you delete a
> character whose electricity caused the line to be indented in some
> special way, when that character was inserted earlier?
I _expect_ to have to type TAB when deleting electric characters.
> After deleting that character, the line might no longer be indented
> correctly.
Really, the only actually valid argument so far is Stefan's of typing
end M-x newline-and-indent RET
when in pascal and on
a := 7.0
^
since it is
end a:= 7.0
but
end
a := 7.0
except, of course, that it is actually
end;
a := 7.0
after all even in Pascal. And pressing TAB on
end;a := 7.0
still will do the right thing. So I don't really think the "inserting
newline will actually cause a different indentation for the line above"
case is relevant enough to fall over backwards for it.
--
David Kastrup
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., (continued)
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Alan Mackenzie, 2014/03/22
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stefan, 2014/03/23
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Alan Mackenzie, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Dmitry Gutov, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stefan, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Alan Mackenzie, 2014/03/22
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stefan, 2014/03/23
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stephen J. Turnbull, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Dmitry Gutov, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Eli Zaretskii, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478.,
David Kastrup <=
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., David Kastrup, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Dmitry Gutov, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Eli Zaretskii, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Dmitry Gutov, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Eli Zaretskii, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stefan, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Dmitry Gutov, 2014/03/24
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stephen J. Turnbull, 2014/03/25
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Steinar Bang, 2014/03/25
- Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478., Stephen J. Turnbull, 2014/03/25