From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Sun, 13 Jun 2021 11:06:55 +0100 Message-ID: <874ke2ulhc.fsf@gmail.com> References: <86a85d26-75c0-e4a3-e8d3-244c5346dd3a@dancol.org> <83r1hehnz9.fsf@gnu.org> <83lf7mhl3n.fsf@gnu.org> <73ff18bf-66dc-7d7a-a0db-8edc2cdceba8@gmx.at> <4140fcf4-3119-3f3f-4ac4-24d497774754@gmx.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11282"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Richard Stallman , emacs-devel , Stefan Monnier , Alan Mackenzie , Eli Zaretskii , Daniel Colascione To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 13 12:08:04 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 1lsN2B-0002hk-IT for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Jun 2021 12:08:03 +0200 Original-Received: from localhost ([::1]:44292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsN2A-0005NK-Jl for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Jun 2021 06:08:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsN1D-0004eH-Cc for emacs-devel@gnu.org; Sun, 13 Jun 2021 06:07:03 -0400 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:34547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsN1B-0004p5-Ly; Sun, 13 Jun 2021 06:07:03 -0400 Original-Received: by mail-wm1-x32a.google.com with SMTP id u5-20020a7bc0450000b02901480e40338bso8058024wmc.1; Sun, 13 Jun 2021 03:07:00 -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=n8ifD29YvurU4quzX12yRGJmLNRl+mDnXWKjnS0pg5A=; b=mzWP3k9FCrGrwMuz4NORcdJ5pTtBlfchKLB6sMem2yzJE5ijpy5uxprJVI4a13DCCn xTGVIDKqsM3GB+GJJ37mZjsyhhRl0eif0envwANgL0Sidcdap37vJOinkKPg1AOkc0A2 slk7ixA3OyPHGrZ7c6m8VcuviXJwZNJiXfo4dU3DzMZcIbVQ34875fSJPFG8rc/Ery2d GBa73ihQdo+NF66f6nW2UVkUJ2YN03XX4SMs9iOWWK2Ts0YNuXemZ/iBZjyZ+yoCiFgb 00EygkftfUpOpVs0bLUdurp4qvFy+457qBRiulX238/xDBa6qvgPxQzUkEsB+cXpQStQ jy6A== 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=n8ifD29YvurU4quzX12yRGJmLNRl+mDnXWKjnS0pg5A=; b=NWM7/b5ZeGYpUU1FTZosYkPrCzpN/Om/TWQHBPnP7ZDaxvkDRCDRR8EEcaSSFlv/UI niiNYUpypxaUxxt0Y45morh9LZHpwWXCVRxqKy8OyzaPCSS7Dn4LaOWQTDBZqjZvnTKr KHzVcEQoBklfFg+cAtBZaAa/ElbS/ODdkKOoh1Df4JU6PKLXaWZWgzpfDm5tTIlIgv8I 088ApeIF0tQQ3IevA2PTGKcKjzrpd2HSn0wMSTMUwMApxeIhB2q1yjaVKBvzFLmJjqlp iKI1e2CK4JNe1A2s0PHfK1OW83LnlI5VD+0iiyznwGoHUyyKIoalJjOOCEzQGodyvc8Z Xt4w== X-Gm-Message-State: AOAM531UycKEycbXWjqnYGPkJJ9jWul+urmNv+th3htYd/+3/CcwRjVg 1d8D+V7plSdOLsQZSkzd1bSot6HocU8= X-Google-Smtp-Source: ABdhPJwVvXyZ8vBnrOWMrYEMR+XGuiAOhlZt8SBSbiqtvycoF02l/xA2zFE1QKmI0B6YvUEDPRd9qg== X-Received: by 2002:a05:600c:410c:: with SMTP id j12mr11175005wmi.117.1623578818946; Sun, 13 Jun 2021 03:06:58 -0700 (PDT) Original-Received: from krug (a94-133-55-152.cpe.netcabo.pt. [94.133.55.152]) by smtp.gmail.com with ESMTPSA id v7sm14410853wrf.82.2021.06.13.03.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Jun 2021 03:06:58 -0700 (PDT) In-Reply-To: (martin rudalics's message of "Sun, 13 Jun 2021 11:39:55 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x32a.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_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, 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:270791 Archived-At: martin rudalics writes: > I admit that this probably meets most users' intentions. What I do not > understand about its implementation is that if `jit-lock-contextually' > is t (as it is usually set by `jit-lock-register'), you unconditionally > add the antiblink mechanism to `post-command-hook' which IIUC causes a > `syntax-ppss' call unconditionally getting run for each command even > when `jit-lock-antiblink-grace' is nil. Is that perception correct? If > so, I think that you should not do that.p Oof, I don't have the implementation of it in L1 cache right now. May be. May be not. The implementation was reviewed closely at the time, including some extensive performance tests in xdisp.c, coordinated by Eli. But looking summarily at the code it doesn't seem to be "unconditionally" at all. There are four different conditions that have to be cumulatively verified before that invocation of syntax-ppss takes place. And I seem to remember that syntax-ppss isn't very expensive anyway. >> Regardless, I would file a bug if I saw that behaviour :-) , > > ... even with `open-paren-in-column-0-is-defun-start' non-nil? Depends on whether parts of Emacs's _require_ it to be non-nil. > But `open-paren-in-column-0-is-defun-start' is a customizable variable. > Which means that a user should be able to use it to control the behavior > of Emacs in this regard. And it is t by default for no obvious > reason. I didn't know it was customizbale (or rather didn't bother to check, I admit). But again, I seem to remember that customizing it back to nil wasn't an option and that Emacs would break. Maybe that has changed? Is it really truly optional? Jo=C3=A3o