From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: electric-indent-mode: abolition of `newline' function is not the Right Thing. Date: Sun, 13 Oct 2013 12:22:33 -0400 Message-ID: References: <20131013101325.GA2621@acm.acm> <20131013140931.GC2621@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1381681370 1895 80.91.229.3 (13 Oct 2013 16:22:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Oct 2013 16:22:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 13 18:22:53 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 1VVORQ-0001jn-Sr for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2013 18:22:53 +0200 Original-Received: from localhost ([::1]:33751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVORQ-0000w9-Eg for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2013 12:22:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVORG-0000w4-5R for emacs-devel@gnu.org; Sun, 13 Oct 2013 12:22:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VVOR8-0000Su-SZ for emacs-devel@gnu.org; Sun, 13 Oct 2013 12:22:42 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:25535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVOR8-0000Sq-Nx for emacs-devel@gnu.org; Sun, 13 Oct 2013 12:22:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCreE/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJIgkwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFMCreE/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJIgkwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="35404812" Original-Received: from 76-10-183-132.dsl.teksavvy.com (HELO pastel.home) ([76.10.183.132]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Oct 2013 12:18:34 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 740FE61191; Sun, 13 Oct 2013 12:22:33 -0400 (EDT) In-Reply-To: <20131013140931.GC2621@acm.acm> (Alan Mackenzie's message of "Sun, 13 Oct 2013 14:09:31 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:164180 Archived-At: > :-) 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'. Right. But the problem is that this is not specific to electric-indent-mode: newline calls self-insert-command, which runs expand-abbrev and (since Emacs24) post-self-insert-hook. Any caller which only wants a \n and no extra doo-dads should not call `newline'. electric-indent-mode just makes this problem more apparent. Stefan