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: Thu, 31 May 2018 19:37:22 +0100 Message-ID: <8736y7brj1.fsf@gmail.com> References: <20180531123747.GA24752@ACM> <87bmcvbygg.fsf@gmail.com> <20180531172841.GB24752@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 1527791765 19867 195.159.176.226 (31 May 2018 18:36:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 31 May 2018 18:36:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Emacs developers , Tino Calancha To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 31 20:36:01 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 1fOSQa-00052l-Rh for ged-emacs-devel@m.gmane.org; Thu, 31 May 2018 20:36:00 +0200 Original-Received: from localhost ([::1]:45649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOSSh-0008WA-Ky for ged-emacs-devel@m.gmane.org; Thu, 31 May 2018 14:38:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOSS3-0008Vs-En for emacs-devel@gnu.org; Thu, 31 May 2018 14:37:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOSS0-0006Iz-BW for emacs-devel@gnu.org; Thu, 31 May 2018 14:37:31 -0400 Original-Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:46735) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOSS0-0006IE-4V for emacs-devel@gnu.org; Thu, 31 May 2018 14:37:28 -0400 Original-Received: by mail-wr0-x22b.google.com with SMTP id v13-v6so22250934wrp.13 for ; Thu, 31 May 2018 11:37:28 -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=dzdG4rZml7t9vXunEoW3K/3cvh9p+uyde6qAAJQiMBU=; b=EJMnp2+ZsBgFv87D6dbsw2A2RXEbZeFahC3HLrWE78B9AM3A1FYE3Y+GFxw/1ce/33 04vZ8/0isQCLeNOTYGYSDyX2E9XO1E8QWBkgBG6Fb57i3QUXFXvp3/PBKoUpR7oCE+x6 uwDQ+Uw0nCkUQ6awfcAIKgEPplPJdfB3SRhV8pL1phDNr0fFMfpXLLvGxYDeCRJRSczq 7qqA//tMsZe8iHDdD+CSLW34aAowk4Avi8a80TFtzQf9n4e9QTv1z8YAauacT9gjfcTJ XEds6qPA0CrG1vHhssDOKhuQRTrz0ivDcjfa5zPI7vZ/Cca2bPKIL5s1HCYCFBMYzh8o SKrA== 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=dzdG4rZml7t9vXunEoW3K/3cvh9p+uyde6qAAJQiMBU=; b=MSH0uVwHDqKhUpv1eaEqJj1jt+e+vjxr4TNB9ln1PyA7Q+D9qfif6i9FM0ka+SPUPq sJw9N6MaFt2FcFcegEx+TmrOAMjUuWhUbE5X0wdsztn4k795OhhHoVHK8RQX3IFkRUtB lnScVJd3aYvY0XnUvVoz3rBl4bhuT8E/tXW+oKNMMmhzgqceiuP+2DjQDmZdjJ6/wRsf UFtJMAQkUIlbRMrHBKo9/l8ppIB4ODYKdWU5JcHt8SFQANcam44ApDmKdNfVbhRNRw4F w9YkLkhFgL/7O7KdqRlj24GCPOhzKAl7TnZKH5z5goz98hDqYb8SHL9ARmGI/ZyOEyEo OKFw== X-Gm-Message-State: ALKqPwcplCdbk7+2wOpLqbZrdAbRxTU9XQvzKIe33dTaiMcNqIZ1CQPo tHcfcIZTFGHNFs9w7nRXaAWfsNYD X-Google-Smtp-Source: ADUXVKLI6+CP1nagLqyoNfl9ZSx6Jm+zllNo2vJco5ZI/ONyX84BW0EbBixVGAbebCFcKnAWZ1d7YQ== X-Received: by 2002:adf:9b11:: with SMTP id b17-v6mr6366931wrc.206.1527791846836; Thu, 31 May 2018 11:37:26 -0700 (PDT) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id 130-v6sm5223890wmv.1.2018.05.31.11.37.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 May 2018 11:37:25 -0700 (PDT) In-Reply-To: <20180531172841.GB24752@ACM> (Alan Mackenzie's message of "Thu, 31 May 2018 17:28:41 +0000") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22b 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:225868 Archived-At: Alan Mackenzie writes: > Hello, Jo=C3=A3o > > On Thu, May 31, 2018 at 17:07:43 +0100, Jo=C3=A3o T=C3=A1vora wrote: >> ( " \n " ) EOF > > I think you mean " ( \n ) " EOF. :-) Right :) > Yes. A string in C(++) mode extending over several lines is only valid > when the newlines are escaped. The generic string syntax is partly an > artifice to get font-lock-warning-face, but is also deliberately > intended to cut the opener of the invalid string off from any subsequent > double quote. But is there another goal here, apart from the goal of visually annotating the error? If the intent is only to annotate the error visually, I'd rather leave that to something like Flymake. Admiteddly, it's not practical now, since Flymake usually works by running the whole buffer through an external syntax check tool, which may take ages compared to using syntax hints from within emacs. But that could be changed, my goal is to let Flymake call backends with only recently changed parts of the buffer, and a much faster syntax-checking backend could be devised. Which reminds me, I never did get an answer to https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00448.html did I? > OK. I'll need to mull this over. OK, do. If you come to the conclusion that it is very important, and when the code becomes stable, I can can increase the complexity of elec-pair.el a bit to make it work in c++-mode. BTW do all cc-based modes "forbid" multi-line strings? >> c-append-to-state-cache: Scan error: "Unbalanced parentheses", 5, 1 > > I don't see this at all. For me, that sequence of actions simply works, > without signalling an error. This was on the master branch as I > committed my change today. Things moves fast :-) I running a master without your commit from around noon. I can't reproduce it now either, good job. Jo=C3=A3o