From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail
From: Eli Zaretskii <eliz@gnu.org>
Newsgroups: gmane.emacs.devel
Subject: Re: master 7362554: Widen around c-font-lock-fontify-region. This
 fixes bug #38049.
Date: Fri, 15 Nov 2019 11:31:04 +0200
Message-ID: <83sgmp32qv.fsf@gnu.org>
References: <20191109144026.20810.76129@vcs0.savannah.gnu.org>
 <20191109144027.DDC3720927@vcs0.savannah.gnu.org>
 <38328d99-23c8-7ba7-a23d-e70ac0aab67a@yandex.ru> <20191111203445.GA5135@ACM>
 <7497e71d-bab6-fa04-bbc4-f52fadeda16d@yandex.ru> <20191113211936.GB4942@ACM>
 <6fc930a1-eb47-9e54-8752-8cf7ff041586@yandex.ru>
 <jwvk182h91u.fsf-monnier+emacs@gnu.org>
 <81e61ed6-27a3-dbdd-34fa-fda779d3e991@yandex.ru> <83blte5y61.fsf@gnu.org>
 <9eff0b15-b8d0-5340-230e-47eed7cf63cb@yandex.ru> <835zjm5xam.fsf@gnu.org>
 <1324bf6c-074e-0a8f-0406-64ba5537bed0@yandex.ru> <83y2wi4f0d.fsf@gnu.org>
 <a0f28a83-9e6a-bfda-5a4c-07507523aa9f@yandex.ru>
Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226";
	logging-data="183160"; mail-complaints-to="usenet@blaine.gmane.org"
Cc: acm@muc.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org
To: Dmitry Gutov <dgutov@yandex.ru>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 15 10:32:42 2019
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Envelope-to: ged-emacs-devel@m.gmane.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.89)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1iVXy5-000lRa-9e
	for ged-emacs-devel@m.gmane.org; Fri, 15 Nov 2019 10:32:41 +0100
Original-Received: from localhost ([::1]:36984 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1iVXy3-0001b9-NA
	for ged-emacs-devel@m.gmane.org; Fri, 15 Nov 2019 04:32:39 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50486)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@gnu.org>) id 1iVXwm-0001WK-1P
 for emacs-devel@gnu.org; Fri, 15 Nov 2019 04:31:21 -0500
Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41789)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@gnu.org>)
 id 1iVXwk-0008FR-Gg; Fri, 15 Nov 2019 04:31:19 -0500
Original-Received: from [176.228.60.248] (port=4548 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@gnu.org>)
 id 1iVXwj-0001fB-RU; Fri, 15 Nov 2019 04:31:18 -0500
In-reply-to: <a0f28a83-9e6a-bfda-5a4c-07507523aa9f@yandex.ru> (message from
 Dmitry Gutov on Thu, 14 Nov 2019 23:07:53 +0200)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Original-Sender: "Emacs-devel" <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.devel:242223
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/242223>

> Cc: monnier@iro.umontreal.ca, acm@muc.de, emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 14 Nov 2019 23:07:53 +0200
> 
> On 14.11.2019 18:08, Eli Zaretskii wrote:
> >> Cc: monnier@iro.umontreal.ca, acm@muc.de, emacs-devel@gnu.org
> >> From: Dmitry Gutov <dgutov@yandex.ru>
> >> Date: Thu, 14 Nov 2019 16:50:14 +0200
> >>
> >> On 14.11.2019 16:48, Eli Zaretskii wrote:
> >>>>> The reality could be different,
> >>>>> and I'd like us to support those different conditions.  It doesn't
> >>>>> sound like it's much harder.
> >>>> There are options, sure. But I think all of them will require explicit
> >>>> support from major modes.
> >>> I don't think so.  All we need to make sure is that the narrowing
> >>> doesn't conceal portions of the embedded fragment.
> >>
> >> I would very much like to read your idea in more detail.
> > 
> > I'm not sure what else is there to say.  Really.  Can you ask specific
> > questions?
> 
> Question one is: do you still stand by that earlier assessment?

Which one?

> > My point was that Alan wanted not to start fontification from a random
> > place determined by blindly narrowing to some arbitrary chunk.  But in
> > mmm-mode the code fragment is present in the narrowed portion in its
> > entirety, so it doesn't sound like we have a real problem here.
> 
> It's what I was hoping would work, but apparently font-lock rules are 
> inevitably called from different narrowings (at least in some, edge-case 
> scenarios). So to be ironclad, CC Mode has to call 'widen' its some of 
> its font-lock-keywords matchers.
> 
> But that breaks the narrowing applied by mmm-mode in its aggregated 
> fontification function.

Maybe we need to revisit the prog-widen idea.