From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: master 7362554: Widen around c-font-lock-fontify-region. This fixes bug #38049. Date: Thu, 14 Nov 2019 16:35:14 +0200 Message-ID: <9eff0b15-b8d0-5340-230e-47eed7cf63cb@yandex.ru> 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> <81e61ed6-27a3-dbdd-34fa-fda779d3e991@yandex.ru> <83blte5y61.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="14885"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: acm@muc.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 14 15:36:10 2019 Return-path: 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 ) id 1iVGEC-0003im-8L for ged-emacs-devel@m.gmane.org; Thu, 14 Nov 2019 15:36:08 +0100 Original-Received: from localhost ([::1]:58268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVGEA-0002VP-E3 for ged-emacs-devel@m.gmane.org; Thu, 14 Nov 2019 09:36:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49712) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVGE4-0002VJ-VP for emacs-devel@gnu.org; Thu, 14 Nov 2019 09:36:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVGE3-0007y9-S4 for emacs-devel@gnu.org; Thu, 14 Nov 2019 09:36:00 -0500 Original-Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:32983) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iVGE3-0007y3-LY; Thu, 14 Nov 2019 09:35:59 -0500 Original-Received: by mail-wr1-x431.google.com with SMTP id w9so6761132wrr.0; Thu, 14 Nov 2019 06:35:59 -0800 (PST) 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=Xy/YcnEAvxH1CffUr8eh3YPGVaHwYdbiQIXSjU71sLg=; b=by/HhiIcYzLmaiNfPD0cPWRwHK3HO6Lj6h3OvvSOGw2MSAkEGGmhn5IZFQyHVtV27q 3qN8Cj7usSgIn0nGYdnbdoQXmBzzvAprWww4S8uU7XMXCEddOMr0NVQsijI49ajthZDi LevDQ0K8Enz5HADjiFI8HpQxctneo//wg5D+xEr20SaFdSLLyTxZZwFsE4W9YND31oWE B7cE397B/OKnHCjJz80FYANV5FzbxGmFksx0YYwlraHXDnj3kAVOucpjTkZh2BVaDc7Y DL15dQyITMEvIhQ0fT8w6zF6zVYgBziXf2TP7kWHtksiYbylU7m4Ta8iLM4QmqDqTwG8 TeKQ== 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=Xy/YcnEAvxH1CffUr8eh3YPGVaHwYdbiQIXSjU71sLg=; b=m2XU/cY/IXArzh+NgY6LVMHUNrh3fE2vit4yYjFjIBLduS3VxlQNRntpVj31Hjnu01 ZpXibt10chxdRDnhc5lICUCR0iBqk0UaVlJgrN4FgWGgW19xWPBNIy+cgW1Nx4+V7qkw n/K44Ryf3n6gesRc9NeOXIiKd21UYFyWC6yU8gqyTEU9rGMVBVc2VWuN6Jd1dTVQovnH 7pPlxBH8abypViXSTli4k/MkdOmbVghziUrNmACl41WmbXT/kxVQws/r4sSnfBhQZIec i4kOwCNEIzgxU/2jeP4C8RdHs+mhznozqclb9+yYP8dMg+YU+jFhOdYH0rnnMq0/eNwU JOfQ== X-Gm-Message-State: APjAAAWJ0qfBfYOPGz/Hv9OtA7u048acgzQSE3Cy/RSq/9zH4TGVS8w+ PGARNzMzXLz5YRf3kVtx303tMx5sJ1M= X-Google-Smtp-Source: APXvYqyUeQVPSkK/T/frFY724eM/VgICDCm0a3W0LHVAvW8z86VNUmXlfo9W3eGg90g5t1rFZcqNzQ== X-Received: by 2002:a5d:5391:: with SMTP id d17mr9286899wrv.382.1573742158053; Thu, 14 Nov 2019 06:35:58 -0800 (PST) Original-Received: from [192.168.0.149] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id s9sm6004976wmj.22.2019.11.14.06.35.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2019 06:35:57 -0800 (PST) In-Reply-To: <83blte5y61.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::431 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:242172 Archived-At: On 14.11.2019 16:29, Eli Zaretskii wrote: >> From: Dmitry Gutov >> Date: Thu, 14 Nov 2019 16:05:13 +0200 >> Cc: Alan Mackenzie , emacs-devel@gnu.org >> >> The hope is that calling vertical-motion (or font-lock-ensure directly) >> inside narrowing is a rare occasion > > Why do we need to have such hopes? For starters, because it's the current expectation of mmm-mode. :-) That's selfish, I know. But the counter-examples are sufficiently rare. > 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. Like adding a new element to prog-indentation-context, which will be a function which either returns new narrowing bounds or does the narrowing itself. And then the major mode will have to make sure to use it everywhere. This particular case is annoying because it seems to mean that the (widen) call in font-lock-default-fontify-buffer doesn't help, and a lot of font-lock-keywords matchers will need to call (widen) anyway.