From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478. Date: Tue, 25 Mar 2014 03:37:15 +0200 Message-ID: <87d2hb9hys.fsf@yandex.ru> References: <20140309123711.GA2615@acm.acm> <20140316223509.GD3854@acm.acm> <20140319224231.GB4783@acm.acm> <20140322131350.GA3163@acm.acm> <20140322223454.GA3562@acm.acm> <20140324224055.GB3825@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395711456 25669 80.91.229.3 (25 Mar 2014 01:37:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Mar 2014 01:37:36 +0000 (UTC) Cc: Stefan , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 25 02:37:45 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WSGJB-0003Yz-T6 for ged-emacs-devel@m.gmane.org; Tue, 25 Mar 2014 02:37:42 +0100 Original-Received: from localhost ([::1]:39198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSGJB-0002ZP-Gb for ged-emacs-devel@m.gmane.org; Mon, 24 Mar 2014 21:37:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSGJ3-0002Yy-LC for emacs-devel@gnu.org; Mon, 24 Mar 2014 21:37:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSGIv-0001yy-GY for emacs-devel@gnu.org; Mon, 24 Mar 2014 21:37:33 -0400 Original-Received: from mail-ee0-x232.google.com ([2a00:1450:4013:c00::232]:55858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSGIv-0001yk-9l for emacs-devel@gnu.org; Mon, 24 Mar 2014 21:37:25 -0400 Original-Received: by mail-ee0-f50.google.com with SMTP id c13so5030374eek.37 for ; Mon, 24 Mar 2014 18:37:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=c8+Injd48xMPuWpGkfMKq+TNOYqjyudzPHdar+7qP1k=; b=bkxQytJ1BjL63LV37+uE1+/x77bMT6310uTTH228DTs6XAqaF0GfNY5lRsPQkDh3tc pHmNLkU6C8Sr/sqD2qwHW8+y3SV1cZhlUhct9jKUTxKoyvDjBQdxuBN4WRrDPxcwh4p2 /byI+6djdzhD6f5XCIvsArkqnIqehXEcxsnieKUGqWQu4x9ajE4XgbAd3NxynLVwNBQ1 hKySBVMU+UR1ez+UNqtSi2kJRuS6+2CC46mci0SzQ1TfA2tUL2DF9qECAqdKZKqZREYn k4zkCkN3EoeIaBDvhPkqPz2m9p7Sw4o+5ylNjZ2/YX3TV76EZdpdCFpVjc5lzSCpE2dO SUQA== X-Received: by 10.15.27.195 with SMTP id p43mr67418025eeu.2.1395711444321; Mon, 24 Mar 2014 18:37:24 -0700 (PDT) Original-Received: from axl ([93.109.138.177]) by mx.google.com with ESMTPSA id 48sm36845284eee.2.2014.03.24.18.37.22 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 24 Mar 2014 18:37:23 -0700 (PDT) In-Reply-To: <20140324224055.GB3825@acm.acm> (Alan Mackenzie's message of "Mon, 24 Mar 2014 22:40:55 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:170942 Archived-At: Alan Mackenzie writes: >> > A mode-dependent or buffer-local dependent setting, as well as, rather >> > than instead of. > >> We have that: electric-indent-local-mode and electric-indent-inhibit. > > OK, for electric-indent-local-mode, which is gradually becoming > prominent. But I though electric-indent-inhibit was a variable for major > modes, not users - a mode initialisation thing, rather than a user > configuration variable. This is usually the case with buffer-local dependent settings. They're impossible to set via Customize (I think), so one doesn't usually think of them as user options, but a user can modify such var in a hook, too. > b - Simplify `electric-indent-post-self-insert-function' such that it > reindents only the line on which the self-inserting character is > typed. It would still need to handle presence of ?\n in `electric-indent-chars' when that's the case. This value is somewhat special since the line-to-be reindented would be the previous, not the current one. > 2. For making RET indent the new line in programming modes: > a - Bind RET to `newline-and-indent' and C-j to `newline' in > `prog-mode-map' and possibly in certain other major mode maps (to be > discussed). I believe there's something to be said for consistency: having RET indent line in some modes, but not others doesn't make much sense to me. There's a certain class of users who've been binding RET to `newline-and-indent' for a long time (myself included), and I haven't seen anyone mention only doing that in prog-mode, instead of globally. > b - (Maybe) create a minor mode to restore RET and C-j to traditional > bindings. How hard can it be for a user to change the key bindings without a mode? >> So make this bug report specific about a particular circumstance where >> the behavior is undesirable, or about how hard it is to disable it. > > I think RMS's bug #16156, reproduced and being discussed on a parallel > thread, is a good enough example, so there's not much point in me opening > a new one. This behavior, as described in the bug above, makes sense to me, so it's clearly a personal preference.