From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: CC Mode and electric-pair "problem". Date: Wed, 27 Jun 2018 14:37:46 +0100 Message-ID: <87o9fwl591.fsf@gmail.com> 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; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1530106882 16994 195.159.176.226 (27 Jun 2018 13:41:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2018 13:41:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 27 15:41:18 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 1fYAh9-0004HA-RX for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2018 15:41:15 +0200 Original-Received: from localhost ([::1]:59325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYAjF-0004Wl-Ca for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2018 09:43:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYAe1-0001EU-4K for emacs-devel@gnu.org; Wed, 27 Jun 2018 09:38:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYAdw-0006xB-2V for emacs-devel@gnu.org; Wed, 27 Jun 2018 09:38:01 -0400 Original-Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:45228) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYAdv-0006wW-R9 for emacs-devel@gnu.org; Wed, 27 Jun 2018 09:37:56 -0400 Original-Received: by mail-wr0-x229.google.com with SMTP id u7-v6so2079354wrn.12 for ; Wed, 27 Jun 2018 06:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=Tl0bSrbHWVFc9NhXAJpyE/fAbVLgOmxXr79omh1VtsE=; b=bJ/WqsyKRJchGimw3j9hUM0U2aMrsLta4sSxs9r3l2NGI+cfdZb1ycdRBQTF4/+pN3 /UxSYKa7U95YF/BhG7vmhciayGrounG5QxuCXuDm7koADjnFmYkg2UIDOximWichnNwd LUj7vK/a7KKgFSfZCUjBHsGLAopMTMni3gOX1ekDdDjEyr0Bl+hTih9XZLokKMwcW2na UX+B0Gqoxyrvnr/unB2uC8ujxhdOihYLEi71LuCQFS5CkB5n90v2ZejAgpeuwXkPVMTD XGaGWsallyW8Kqw3QW7FhLmTcdntZhUdmhwY0blxnIv0zxHzaLH90ThltpbJyj9LyARs a54Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Tl0bSrbHWVFc9NhXAJpyE/fAbVLgOmxXr79omh1VtsE=; b=QsgLVSGm+QIJySXoBSFpJZiZvjciGd+OrPcc65YvhE0v4uqeugYEDhAAjD/SrmDm/u khyBmzvnYZDOWx4fDXRmUezj1Rbw2LZb8gxrZIotBfDBGz/E0nZNA8H6Mym/6NNVOnzn thkxHhl9Ax/QOe/gEyKAaViXUT8wF50rRrMNDRTIM8AZ7Z7SjYe/Tt8dLoDbT5QrPF0i iuxG9u1uLH9QpbicBeXpvfzKxKl/3/f6HMMe9HMb32bokKYZl+WdEon4myOKuObnFAcz nilOYyGIXL5SxqNZP3s3AOckkncst0kJOX/LN8nGc3UuqUXb+YneoOSjmVHazuZFxP4C B9Wg== X-Gm-Message-State: APt69E1EiLC4v+/iyzurs8LCLIvL1Zam8rma6XHlgRQJRliaTI0dys+T 6OWSm+Cwj3LFvwaCe0zzbWww6h2WOmw= X-Google-Smtp-Source: AAOMgpeyqoCCshGK1wID30vhqTwgpUaNBp2O+Oic9c/bsPRdo6SV5e5IWptC+9fixjiRWJcMqsXIUQ== X-Received: by 2002:adf:af45:: with SMTP id z63-v6mr4218280wrc.238.1530106674492; Wed, 27 Jun 2018 06:37:54 -0700 (PDT) Original-Received: from lolita.yourcompany.com ([194.117.2.109]) by smtp.gmail.com with ESMTPSA id c123-v6sm5484889wma.43.2018.06.27.06.37.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Jun 2018 06:37:53 -0700 (PDT) In-Reply-To: <20180626182348.GB4464@ACM> (Alan Mackenzie's message of "Tue, 26 Jun 2018 18:23:48 +0000") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::229 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:226767 Archived-At: Alan Mackenzie writes: Hi Alan >> > unclosed quote will only cause refontification up to the end of the li= ne? >> > That would be a very nice improvement. I don't use electric-pair-mode= , and >> > as things currently stand inserting an unmatched quote applies >> > font-lock-string-face to the entire buffer, which is a bit annoying. >> (add-hook 'post-self-insert-hook >> (lambda () >> ...=20 >> (insert last-command-event))))))) >> 'append 'local) > > This is effectively electric-pair-mode, which if enabled, already > inserts two "s when you type ". > > Not everybody likes electric-pair-mode. I don't think your suggestion > is any better than mine (snipped) to which you replied. To be perfectly honest, I got confused by Stefan's suggestion, too. If the goal is to have electric-pair-mode-like behaviour, just turn on electric-pair-mode. I'd just like to point out, however, that automatically pairing quotes and parens extends far beyond electric-pair-mode. Of course I think it's the best of the bunch, but there are other popular packages like smartparens, paredit, wrap-region, textmate (and even my previous autopair which some insist on using for some reason). Jo=C3=A3o