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: [patch] make electric-pair-mode smarter/more useful Date: Thu, 12 Dec 2013 11:30:53 -0500 Message-ID: References: <87haalh806.fsf@gmail.com> <87d2l9wfne.fsf@yandex.ru> <87fvq49xzp.fsf@gmail.com> <87vbyuwyyc.fsf@gmail.com> <52A93B99.8040308@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1386865880 2734 80.91.229.3 (12 Dec 2013 16:31:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Dec 2013 16:31:20 +0000 (UTC) Cc: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 12 17:31:25 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 1Vr9AY-0006Gk-7b for ged-emacs-devel@m.gmane.org; Thu, 12 Dec 2013 17:31:22 +0100 Original-Received: from localhost ([::1]:37473 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr9AX-000655-OS for ged-emacs-devel@m.gmane.org; Thu, 12 Dec 2013 11:31:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr9AN-0005ts-7I for emacs-devel@gnu.org; Thu, 12 Dec 2013 11:31:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vr9AD-0007Wx-Ds for emacs-devel@gnu.org; Thu, 12 Dec 2013 11:31:11 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:56363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr9AD-0007Wr-9S for emacs-devel@gnu.org; Thu, 12 Dec 2013 11:31:01 -0500 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id rBCGUtSW014045; Thu, 12 Dec 2013 11:30:56 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 45757AE350; Thu, 12 Dec 2013 11:30:53 -0500 (EST) In-Reply-To: <52A93B99.8040308@yandex.ru> (Dmitry Gutov's message of "Thu, 12 Dec 2013 06:29:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4790=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4790> : inlines <316> : streams <1089679> : uri <1621954> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:166335 Archived-At: > I don't think this is sufficient: what if I want to type a one-line function > or object literal (say, an empty one)? Or an empty for, while or catch body? > I'd have to remove the added newline(s) and whitespace in each > such instance. As explained, electric-layout-mode is directly inspired from cc-mode's corresponding feature. In C modes and friends, you rarely (if ever) write "{ }", so there was no need for such a thing. > I'd much prefer a workflow where electric-layout-mode doesn't do anything > until I press Return, and then does the autopair-newline thing if point is > directly between two parens. I think it makes sense. I'd welcome an extension of electric-layout-mode which provides such a functionality. Stefan