From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?S=C3=A9bastien?= Miquel Newsgroups: gmane.emacs.bugs Subject: bug#46558: Interaction between font-lock-extend-region-wholelines and font-lock-extend-region-multiline Date: Tue, 16 Feb 2021 13:13:17 +0100 Message-ID: Reply-To: sebastien.miquel@posteo.eu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34291"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 To: 46558@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 16 13:14:22 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lBzFG-0008nq-Af for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Feb 2021 13:14:22 +0100 Original-Received: from localhost ([::1]:60046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBzFE-0008HQ-Sc for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Feb 2021 07:14:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBzEx-0008FW-R7 for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 07:14:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lBzEw-0002rI-R4 for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 07:14:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lBzEw-0005KR-Lr for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 07:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?S=C3=A9bastien?= Miquel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Feb 2021 12:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46558 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161347760520413 (code B ref -1); Tue, 16 Feb 2021 12:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Feb 2021 12:13:25 +0000 Original-Received: from localhost ([127.0.0.1]:39599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBzEL-0005JB-Bj for submit@debbugs.gnu.org; Tue, 16 Feb 2021 07:13:25 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:33376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBzEK-0005J4-88 for submit@debbugs.gnu.org; Tue, 16 Feb 2021 07:13:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBzEK-0008E0-2S for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 07:13:24 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:59656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBzEH-0002Zx-QS for bug-gnu-emacs@gnu.org; Tue, 16 Feb 2021 07:13:23 -0500 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 97AA616005C for ; Tue, 16 Feb 2021 13:13:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.eu; s=2017; t=1613477598; bh=phIxlbi/DYmrwNxGu/M4vkwmT0zf5LCv0SXSWuNxr8E=; h=To:From:Subject:Date:From; b=Ft46xp5sm/HVuLPhRUtUzgqhQ2v29NlijhzUgfaXTS+RfqTmAboaCEO1EMoCwFU59 aBWjdCjFMdH6RGoukwapbHAiEVcBixyoPN7xSd43+HWhbGaf0fslGXkMUscfcEms4j 4XiyKMizlSl3okSz4eMBrMVOOsbZzTvCWb6EU7Widw8RXwROwhcGXrhgVNB7Tl2K3j DhGTo/+Kh1G8dOd5zFdcXxYobABz9laeFiV+4Hq6OqwNlwSfrF6NzrAPyFuzIMMU2C kBRKGbYV3907z6+2sr8GeAu1p3OSG7pZGuxdVYrGxWnxp7tkgpqU4vuWB5DZoCqlJ/ At1njj/JIJ8ig== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Dg0HK6pbrz9rxK for ; Tue, 16 Feb 2021 13:13:17 +0100 (CET) Content-Language: fr Received-SPF: pass client-ip=185.67.36.65; envelope-from=sebastien.miquel@posteo.eu; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:200116 Archived-At: Hi, In org-mode, blocks are fontified with the font-lock-multiline property. When editing the line right before a block, the whole block is needlessly refontified (use highlight-refontification-mode to check). This is because the font-lock-extend-region-wholelines extends the region to the beginning of the next line, which has the font-lock-multiline property. Then font-lock-extend-region-multiline extends the region to the end of the block. If a second block follows the first one, with no empty line between, it is refontified as well. Maybe font-lock-extend-region-multiline should check if the char right before font-lock-end has the font-lock-multiline property as well before extending the region. I've tried it, and haven't found any issue in this use case. -- Sébastien Miquel