From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: CC Mode and electric-pair "problem". Date: Wed, 20 Jun 2018 09:48:43 -0400 Message-ID: References: <20180531123747.GA24752@ACM> <20180617201351.GA4580@ACM> <20180618103654.GA9771@ACM> <20180618154227.GB3973@ACM> <20180618180846.GC3973@ACM> <8f6c273f-9a20-0744-7f26-533aabb97a48@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1529502411 8756 195.159.176.226 (20 Jun 2018 13:46:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 20 Jun 2018 13:46:51 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 20 15:46:47 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 1fVdRd-00029f-0q for ged-emacs-devel@m.gmane.org; Wed, 20 Jun 2018 15:46:45 +0200 Original-Received: from localhost ([::1]:49821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVdTk-000575-8C for ged-emacs-devel@m.gmane.org; Wed, 20 Jun 2018 09:48:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVdTd-00056O-6N for emacs-devel@gnu.org; Wed, 20 Jun 2018 09:48:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVdTa-0005TS-3P for emacs-devel@gnu.org; Wed, 20 Jun 2018 09:48:49 -0400 Original-Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]:33912) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVdTZ-0005T7-UN for emacs-devel@gnu.org; Wed, 20 Jun 2018 09:48:46 -0400 Original-Received: by mail-qk0-x236.google.com with SMTP id q70-v6so1835916qke.1 for ; Wed, 20 Jun 2018 06:48:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=fOPPw9x5V3aE7IohDHFM4GuxJ4b9nNhnNtFMXw3KhtU=; b=HX0sdNVIcwXCaGAX1Bg7cn84Qo5u7X4kTGJI/AQSZZ4NcGY23RdorhTXQOxN5cBgqY SlwodZKNeGe9qVjTPdF+EwzUUD1VKcBdqCMri4bSgZpc9UzvUw2Z9LpCA6thKsRhnOGm xlpizLu3BJyNjLxwwG4MjlwOrUUHvGCNO/JSfFVrrqWcJbfYMIxky58mzdtWp33I+E23 vjapHJXULpLzlA/E/HI5YDSeMioQ80h5OV9oHhkk2jqM9hdeVCI1AFEyYL2QepiIzZT7 W8OffQh8lEscP+9wqPopWv6EazsQUur7MfbBmBADlUMSn1L+UMD1T3eMCeo+7LB3KMRl dEtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fOPPw9x5V3aE7IohDHFM4GuxJ4b9nNhnNtFMXw3KhtU=; b=qGRdgyiTh/N0EJ3fwJLHLBn2ca6YxGU9k4CfZLtCxw1+egzrzfRsQKAixAIBSsbNUC aOZNoL6/+ZFUerSBVIBBaOCRrQG35ADF0hW/RRw1wcpwWcKv/XQGrBqEC6XOF4RMmHqN ZXGNaJQwnQHyIcfBdzKCUFzmg0cx1xdvsgrgaEyydSw7csqnOnFYyYQjrrcMqqj8yOzR U/p3MtW5r0L9mv6dOdEdLLfkho9TlDFPQsfjDP7nFqmtvSIkynN7PNI61XZHhtCRTrGR XzJ4xxiy2ojCWEzAeJlp7zdB6WhvQfH3lJyB55znJKXs6h5ybaoRoLqR+ZMFv4PBUNeU BBpg== X-Gm-Message-State: APt69E2l9ijl1IVE0vMXf01D5S9ky6PqQ4ovp+0iFETPCiimBAj15bRh leEyBvMtFpVXHn2e3nrPs8Wn7AN0 X-Google-Smtp-Source: ADUXVKIVhsVbY4oZcUqbr8E1gcPPOxlIlhqofIUZ+th4k1CglgzBGOzHT2zqnMHz8mKIkPiITj1T9A== X-Received: by 2002:a37:6403:: with SMTP id y3-v6mr17382186qkb.279.1529502525079; Wed, 20 Jun 2018 06:48:45 -0700 (PDT) Original-Received: from [172.16.78.120] ([38.98.241.254]) by smtp.gmail.com with ESMTPSA id f8-v6sm1386378qkm.42.2018.06.20.06.48.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 06:48:44 -0700 (PDT) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::236 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:226549 Archived-At: On 2018-06-19 02:38, Stefan Monnier wrote: > It's easier to highlight the unmatched opener than to try and prevent > the second line from being highlighted (and you want to highlight that > opener in any case). Maybe, but I find it much more pleasant if the second line isn't highlighted. > Not sure what you mean by "bail out". Point 1 has added highlighting to > warn the user about the presence of a problem. Short of changing the > actual code behind the user's back, there's really not much more we can > do to prevent the compiler/IDE from seeing that broken code. We want the compiler and IDE to see the broken code, but we also want to do as much as we can to make the experience pleasant (and I find it unpleasant that inserting an unmatched '"' breaks syntax highlighting for the rest of the buffer. As an example, Merlin does a great job at handling broken OCaml code. > Point 2 suggest to go with the simplest implementation (i.e. let the > behavior be dictated by the implementation), so if your highlighting is > provided by LSP (say), then point 2 would suggest that there's no point > trying to provide a different behavior from the one provided by the > LSP server. Yes, I agree. In the meantime, approximating that at the cost of a bit complexity in the Emacs mode seems good. Clément.