From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478. Date: Sat, 8 Mar 2014 22:58:20 +0000 Message-ID: <20140308225820.GB2726@acm.acm> References: <20140222182704.GA2639@acm.acm> <20140228195051.GA3446@acm.acm> <20140302115118.GA3768@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1394319730 11326 80.91.229.3 (8 Mar 2014 23:02:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2014 23:02:10 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 09 00:02:15 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 1WMQFy-0005vq-16 for ged-emacs-devel@m.gmane.org; Sun, 09 Mar 2014 00:02:14 +0100 Original-Received: from localhost ([::1]:42057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMQFx-0004xq-N9 for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2014 18:02:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMQFn-0004xX-T1 for emacs-devel@gnu.org; Sat, 08 Mar 2014 18:02:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMQFg-00030C-E2 for emacs-devel@gnu.org; Sat, 08 Mar 2014 18:02:03 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:16558 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMQFg-000302-50 for emacs-devel@gnu.org; Sat, 08 Mar 2014 18:01:56 -0500 Original-Received: (qmail 36422 invoked by uid 3782); 8 Mar 2014 23:01:53 -0000 Original-Received: from acm.muc.de (pD951AEEF.dip0.t-ipconnect.de [217.81.174.239]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 09 Mar 2014 00:01:52 +0100 Original-Received: (qmail 4901 invoked by uid 1000); 8 Mar 2014 22:58:20 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 193.149.48.1 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:170231 Archived-At: Hello, Stefan. On Mon, Mar 03, 2014 at 10:48:50PM -0500, Stefan Monnier wrote: > > Using version numbers to check for features is not exactly clean coding. > Much less hideous than checking how many times a function was called. Uh?? Why are you comparing the checking of Emacs's version number with testing whether a function has been called? There lacks a clean way of determining if a minor-mode function has been called. There is a clear need for such a facility. > > The default for electric-indent-mode is changed in a future Emacs > > version. > So it's hypothetical. We'll cross this bridge if/when we get there. > > The challenge is to distinguish between (i) and ((ii) or (iii)). What exactly do (i), (ii), and (iii) mean? You have cut so much out of my post that the meaning has been lost. This is extremely annoyinng, and you do this frequently. Could you be less severe with your cutting in the future, please. > No, we should only care about "enabled" and "disabled". That's a fairly contentious opinion, not backed up by any reasoning. Would you care to give your reasons why "default state" is not to be cared about? As we have discussed before, it is essential that c-electric-flag be enabled by default for CC Mode buffers. Without it, indentation would need to be done manually, e.g. by continual use of the tab key. Yet c-electric-flag, a buffer local flag, is now inextricably coupled to electric-indent-mode, a crude global flag. A user wishing to disable electric-indent-mode for some random buffer will find automatic indentation broken in her C Mode buffers. There is no mechanism provided to users by electric-indent-mode to enable it selectively in a buffer. Even the undocumented electric-indent-local-mode doesn't work properly, as you admitted recently. In the massive confusion and possible protest that will follow in the wake of the release of electric-indent-mode, one of your options will be to disable the mode by default. Would you please give your word, as a gentleman, that whatever transpires, after the sequence emacs -Q, C-x C-f foo.c, foo.c's copy of c-electric-flag will always be t. > Stefan -- Alan Mackenzie (Nuremberg, Germany).