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: electric-indent-mode: abolition of `newline' function is not the Right Thing. Date: Sun, 13 Oct 2013 14:09:31 +0000 Message-ID: <20131013140931.GC2621@acm.acm> References: <20131013101325.GA2621@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1381673503 20526 80.91.229.3 (13 Oct 2013 14:11:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Oct 2013 14:11:43 +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 Oct 13 16:11:46 2013 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 1VVMOX-0001Qi-RW for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2013 16:11:45 +0200 Original-Received: from localhost ([::1]:33232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVMOX-0006m5-5r for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2013 10:11:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVMON-0006lq-AY for emacs-devel@gnu.org; Sun, 13 Oct 2013 10:11:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VVMOE-00060a-EN for emacs-devel@gnu.org; Sun, 13 Oct 2013 10:11:35 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:31795 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVMOE-00060B-4h for emacs-devel@gnu.org; Sun, 13 Oct 2013 10:11:26 -0400 Original-Received: (qmail 78883 invoked by uid 3782); 13 Oct 2013 14:11:22 -0000 Original-Received: from acm.muc.de (p5492C747.dip0.t-ipconnect.de [84.146.199.71]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 13 Oct 2013 16:11:22 +0200 Original-Received: (qmail 4038 invoked by uid 1000); 13 Oct 2013 14:09:31 -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:164175 Archived-At: 'morning, Stefan! On Sun, Oct 13, 2013 at 09:23:49AM -0400, Stefan Monnier wrote: > > I discovered this whilst trying `electric-indent-mode' in Text Mode. > > I have a command which starts a new paragraph thusly: > > (i) It calls `newline' and inserts, e.g. "(vi) ". > Use (insert "\n") rather than (newline). :-) Of course there are workarounds, but that's not the point. There are approximately 198 calls to `newline' in the Emacs Lisp sources, and an unknown further number in other Lisp files and users' .emacsen. Some of these calls are going to get broken by the effective change to `newline'. Redefining `newline' as `newline-and-indent' whilst `electric-indent-mode' is active is not the Right Thing to do. > Stefan -- Alan Mackenzie (Nuremberg, Germany).