|
From: | Dmitry Gutov |
Subject: | Re: newline-and-indent vs. electric-indent-mode |
Date: | Sun, 24 Jan 2021 23:45:57 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 24.01.2021 07:29, Stefan Monnier wrote:
All right, filed as bug#46064.Thanks.I think `electric-indent-mode` is annoying in any case if the indentation code disagrees with your style.True, but my present complaint is about it being annoying *twice* for the same line. And if it's being annoying while point is still on that line, it's marginally easier to fix.BTW, I just want to clarify that while I'm to be blamed for the current behavior, I'm perfectly happy if someone wants to change it. My main goal was to consolidate all those major modes's ad-hoc auto-indent (typically by binding RET to `newline-and-indent`) into a global user config, and that's done.
I've considered what default we could change, but if we wanted to set electric-indent-inhibit to t by default (after resolving bug#46064), most/all major modes should first get electric-indent-functions similar to #'ruby--electric-indent-p to compensate for it, and that's a non-trivial effort, not to mention the change in user habits.
Though we probably could generate something based on SMIE grammar, in modes based on it.
[Prev in Thread] | Current Thread | [Next in Thread] |