From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: CC Mode and electric-pair "problem". Date: Thu, 28 Jun 2018 23:42:34 -0400 Message-ID: References: <20180531123747.GA24752@ACM> <20180617201351.GA4580@ACM> <20180618103654.GA9771@ACM> <20180618154227.GB3973@ACM> <20180619050244.GA3946@ACM> <20180626182348.GB4464@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1530243670 5067 195.159.176.226 (29 Jun 2018 03:41:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 29 Jun 2018 03:41:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 29 05:41:06 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYkHR-0001Cp-UQ for ged-emacs-devel@m.gmane.org; Fri, 29 Jun 2018 05:41:06 +0200 Original-Received: from localhost ([::1]:39677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYkJZ-0004JY-5Y for ged-emacs-devel@m.gmane.org; Thu, 28 Jun 2018 23:43:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYkIy-0004JS-0A for emacs-devel@gnu.org; Thu, 28 Jun 2018 23:42:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYkIu-0001Xs-St for emacs-devel@gnu.org; Thu, 28 Jun 2018 23:42:40 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:49032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYkIu-0001Wr-Nx for emacs-devel@gnu.org; Thu, 28 Jun 2018 23:42:36 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w5T3gYPK008812; Thu, 28 Jun 2018 23:42:34 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 3232A6611F; Thu, 28 Jun 2018 23:42:34 -0400 (EDT) In-Reply-To: <20180626182348.GB4464@ACM> (Alan Mackenzie's message of "Tue, 26 Jun 2018 18:23:48 +0000") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6318=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6318> : inlines <6728> : streams <1791054> : uri <2665708> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:226829 Archived-At: > This is effectively electric-pair-mode, which if enabled, already > inserts two "s when you type ". It's very different: it inserts/removes the second " at the end of the line, so it ends up behaving very much like your current code, except: - it only affects self-insert-command. - it uses an explicit " character rather than a syntax-table text-property. So OT1H it provides a behavior closer to current `master` than to electric-pair-mode, but like electric-pair-mode it has a fairly focus'd effect, so is less likely to have unexpected interactions. > Not everybody likes electric-pair-mode. I don't think your suggestion > is any better than mine (snipped) to which you replied. Its main benefit is that it's very superficial with a narrow focus. No need to change any core API like syntax-tables with a feature which will need to be supported for the next very many years. Stefan