From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Sat, 5 Jun 2021 23:25:41 +0300 Message-ID: <75162ded-1ae5-6a12-f730-691edb96e5e0@yandex.ru> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34625"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 Cc: emacs-devel@gnu.org To: Alan Mackenzie , Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 05 22:26:35 2021 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 1lpcsN-0008tT-4I for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Jun 2021 22:26:35 +0200 Original-Received: from localhost ([::1]:40650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpcsM-00075g-6V for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Jun 2021 16:26:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpcrb-0006Oz-DN for emacs-devel@gnu.org; Sat, 05 Jun 2021 16:25:47 -0400 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:38818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpcrZ-0002LZ-I7 for emacs-devel@gnu.org; Sat, 05 Jun 2021 16:25:47 -0400 Original-Received: by mail-wm1-x32d.google.com with SMTP id t4-20020a1c77040000b029019d22d84ebdso9943807wmi.3 for ; Sat, 05 Jun 2021 13:25:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QqynM7YDZWCsiOUGqGHh6VKrZ23edif68L1wxL/RXSQ=; b=IgjyliNMTXgjGzH8/8n0rcqCQFsrdHeh3NQ7MFs+uuotTb6paxbf54jilRQeV1IlER xE7p+hOgrJHMnMsZI66KQsJdOUoqfCUKdd5oezlRp33Sqsa+DYDQRqyHzXfG1AtaT0NX PbqHFR1zmZl03PQBfWwLCESoHYuOQqTlYLvslyBcQc47/IEWKSLWAXQd9Gh7F10EdP0x yafRc8qVZwboIstdXV9apESFtDYrjXUyMcw4CmmKJYunebMy363VOYgUzZHGsMbVbwxd gkMzCBIC0evpSCIAOxZIYKOXJKmClUcE7LtpUdD/zMqbcYBrmOPORK80Jp7Ga1OZ3KsK F/7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QqynM7YDZWCsiOUGqGHh6VKrZ23edif68L1wxL/RXSQ=; b=r/8h7jng+PQGbZdRh4UQHfuoLeCD7RKqQY1Rt1RwTobfXcZCSXfsmfUVw0T3rgQoXR /S6CNhaHQ+tlqyz3d1OFHdKveyhVmvmaM/OnADs2XEwQ7uRYuAB/Qynx6Oa5imN6to/c NFlR7YrAQwKVDHjULY0DY6RCE2ngT021gpqikDR+QAKL91aWHH/QZ9BOM8oQRufLnN7+ 6o2yctUqEYYv0ZeUjqV8/tClGj0f9+xvEgpyEzjHbNkUpGwmP7SByJKTknBp7Mub6UDp obLmrD3hBckx0S1rqupvGCeMJFno4OVQm4Pn9x8wuAuXHxnFg5ucK/pnuB16Z7CpO0vw LJtw== X-Gm-Message-State: AOAM532CvvyVcAhStZeNjJRsKlYWwK6YQLh6XZodbUYMQG60xxrvucIj fLgXjJtF6g1RVqXqMLqEhEtxEtY8RgE= X-Google-Smtp-Source: ABdhPJz9G5pYcuF8V9i5396yMTUeDYPvoQOQ0+ihvwjZu+TNleLUyIwzuRue+3h1RZ+Y8PJVZVGB9Q== X-Received: by 2002:a1c:770b:: with SMTP id t11mr9595561wmi.79.1622924743965; Sat, 05 Jun 2021 13:25:43 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id a3sm11286150wra.4.2021.06.05.13.25.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Jun 2021 13:25:43 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.59, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:270447 Archived-At: On 04.06.2021 18:54, Alan Mackenzie wrote: > Whether a type is recognised as such depends on that, yes. It's hard to > think of a better way without having the resources of a compiler, > particularly for ill-behaved languages like C+ Would it work much worse if you took the approach of not applying the highlighting when you frequently cannot be sure of what the type of the term is? That would mean none of the types in brackets would be highlighted in the original example, but perhaps that is still better than the current result?