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: Sun, 17 Jun 2018 17:07:20 -0400 Message-ID: References: <20180531123747.GA24752@ACM> <20180617201351.GA4580@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1529269539 26765 195.159.176.226 (17 Jun 2018 21:05:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 17 Jun 2018 21:05:39 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 17 23:05:35 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 1fUere-0006sd-SF for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 23:05:34 +0200 Original-Received: from localhost ([::1]:56427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUetm-0002gj-1S for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 17:07:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUetf-0002gd-Gp for emacs-devel@gnu.org; Sun, 17 Jun 2018 17:07:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUeta-0004ZA-JH for emacs-devel@gnu.org; Sun, 17 Jun 2018 17:07:39 -0400 Original-Received: from [195.159.176.226] (port=35924 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUeta-0004Yv-CJ for emacs-devel@gnu.org; Sun, 17 Jun 2018 17:07:34 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fUerM-0006Xz-DZ for emacs-devel@gnu.org; Sun, 17 Jun 2018 23:05:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 16 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:r6iG8YgRLZKAgKmERGiGytAwqsE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:226434 Archived-At: > My favoured method would be to alter electric-pair--skip-whitespace such > that a NL terminating a string (as contrasted with a NL terminating a > comment) would be allowed to be scanned over. AFAIK no language currently offers "NL terminating strings". So, we should indeed behave as if this NL doesn't terminate the string (IIUC the problem is that CC-mode marks NL-inside-string as if it terminates a string, but that's just an internal detail which shouldn't have such visible side-effects. Personally I'd vote to just not treat NF-inside-string in such a special way: it's a lot of trouble on the implementation side for very little benefit to the end user since the way strings are font-locked makes it trivially obvious to the user what's going on). Stefan