From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: emacs rendering comparisson between emacs23 and emacs26.3 Date: Sat, 28 Mar 2020 10:43:00 -0400 Message-ID: <7ee94ed4-7a11-90bd-df69-c0eeacaf191c@gmail.com> References: <86tv2h2vww.fsf@gmail.com> <20200322123818.GB32470@ACM> <87eetk5swm.fsf@gnu.org> <20200326193128.GC14092@ACM> <86d08y4zsx.fsf@gmail.com> <83sghs7qdz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="44382"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 28 15:43:42 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jICgX-000BPg-W8 for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Mar 2020 15:43:41 +0100 Original-Received: from localhost ([::1]:53648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jICgW-0008I6-Ue for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Mar 2020 10:43:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35163) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jICfx-0007bu-2R for emacs-devel@gnu.org; Sat, 28 Mar 2020 10:43:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jICfv-0003i8-R0 for emacs-devel@gnu.org; Sat, 28 Mar 2020 10:43:04 -0400 Original-Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]:43372) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jICfv-0003gG-NI for emacs-devel@gnu.org; Sat, 28 Mar 2020 10:43:03 -0400 Original-Received: by mail-qk1-x72b.google.com with SMTP id o10so14059230qki.10 for ; Sat, 28 Mar 2020 07:43:03 -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=RjVJOz7T6hJA7r71XwZcYlBKLeNRM3z9uFl4Q2DE7EE=; b=YS3/zLG7GWlvJIx3/NPPHMI9sgiswd3G7sJ3YfkqCi0lRBUUtakdxQcDx4cZMNNPcI 7KzLjvEEKWYHD+IVbUGpUXF+XWBMcjqtA0SHYxUdWVwJZWs9+foM4wsNeZE4ofGq6iKM V0PflO2xfT0P/q7Tn3s76IYQmUxZx0P26q7ckTgvWSdAcWKGEWKF/0Ij5SHZCQIM+3NC xd6MoaIdw0Dkgo1vrGp1Xe4XIysK+a18MjMOYug+jZdByT2iM1GTBdHw5GuwGcU3MPmB ZkDwKD83xM9Tgc200DxTHiozh2uitPCe8R620oE/nwVPc8WuToq4/LxvokhePdvd0/aO XyMA== 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=RjVJOz7T6hJA7r71XwZcYlBKLeNRM3z9uFl4Q2DE7EE=; b=E7S+XEy95jHJoyyEX80GftJqb+VbZ/Plps0Vcz7yLJMkOGPUNmSocvUh01K+kEscH8 l5IwLlyxam9izWQwq2czvkPTXeDYZb2mU91vwuDFM8If002XQ75w6rkOHi9xeGa5zsOC BsJpfHIBGszDPMgXn9pYSGA0u9Iq9PMZdUGb4dWF/zXFnAbktTSpERnUkxxdP5HW6UAr /ihPFv9v54pPmZ1ULjPts9+NGpIfAXc1Uv9JNZK7t3wVPHS9MqBjqlqdQhjZkpb69rtO eD42zt7xx7bpBPxfWIMO3HaWsx3T/14VVOs1ebuXR0woUFDo+wmaI+qYZcwiB5HPIJLw tmkA== X-Gm-Message-State: ANhLgQ07Oc43yvxp8G1ghE4cQrYjZZd7UNU8Wi+35rRD5NhRE1PZ111V W+WeThbIz2TZbK889teiAKHb2vLQ X-Google-Smtp-Source: ADFU+vvxTSc9caC0uPm5kZdVZcsgkU2sfQuHrUHaqneKNF9RrvBPyKj1debLd3LrPZkmuDximodbDw== X-Received: by 2002:ae9:e711:: with SMTP id m17mr4257720qka.129.1585406582739; Sat, 28 Mar 2020 07:43:02 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:dcae:d149:538a:1f37? ([2601:184:4180:66e7:dcae:d149:538a:1f37]) by smtp.googlemail.com with ESMTPSA id f13sm6204293qti.47.2020.03.28.07.43.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 28 Mar 2020 07:43:02 -0700 (PDT) In-Reply-To: <83sghs7qdz.fsf@gnu.org> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::72b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245876 Archived-At: On 28/03/2020 05.58, Eli Zaretskii wrote: > I think the way to increase performance of C/C++ fontification, > indentation, etc. is to use syntactic analysis in C (or another > similarly fast compiled language). Several programs/libraries are > available out there for this purpose, and we should encourage > interested individuals to work on making these used by our major modes > that support programming languages. The time we could do that with > ad-hoc regexps and the likes of syntax-ppss has gone, IMO. I've looked, but I don't really know of any such libraries. The problem that cc-mode has to solve most of the time is fontifying an invalid C program (since, unless the programmer is using a structural editing mode), code that is being typed is invalid most of the time. Most language parsing facilities out there do not have great error recovery, so they are not very good at giving semantic annotations useful for syntax highlighting broken code. The only great example I know is the OCaml parser written in Menhir, which is incredibly robust. The most extreme one I know in the other direction is agda-mode, which only displays syntax highlighting when the buffer contains syntactically valid, type-correct code. I wonder if Stefan's smie could be used to do syntax highlighting. Clément.