From unknown Sun Jun 22 17:15:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28599: 26.0.50; font-lock-ensure changes the face of text buttons Resent-From: Alexander Miller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2017 19:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 28599@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150636889017335 (code B ref -1); Mon, 25 Sep 2017 19:49:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 Sep 2017 19:48:10 +0000 Received: from localhost ([127.0.0.1]:58966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwZMP-0004VX-KE for submit@debbugs.gnu.org; Mon, 25 Sep 2017 15:48:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwZMN-0004VI-DU for submit@debbugs.gnu.org; Mon, 25 Sep 2017 15:48:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwZMH-0008CZ-89 for submit@debbugs.gnu.org; Mon, 25 Sep 2017 15:48:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56914) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwZMH-0008CP-4h for submit@debbugs.gnu.org; Mon, 25 Sep 2017 15:48:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwZMG-0008Rw-1i for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2017 15:48:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwZMC-0008B3-VD for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2017 15:48:00 -0400 Received: from mout.web.de ([212.227.17.12]:52491) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dwZMC-00089x-LR for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2017 15:47:56 -0400 Received: from [192.168.1.8] ([109.192.99.67]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M5fwS-1d812X2jsW-00xeRs for ; Mon, 25 Sep 2017 21:47:53 +0200 From: Alexander Miller Message-ID: <89bbbfb8-efe5-edca-a571-ca73267cb498@web.de> Date: Mon, 25 Sep 2017 21:47:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Provags-ID: V03:K0:bGy7tlCS4uTyStZlxbtwT0kbK/NRfFM/sfr455KJhYAR3JurTCF pr6eHJilSriijTK9uDTHs4iocfURjRtl6qiNJ6rmM1iHBHTjCFxWxcHkhJuXsqU6UYyfHIu MZmrmn+e+fOnbmVJDXZM2YaXLLxe1SeqqUwWqaDDc5gDfkuQppJMqhGJSuAYOz3ZR0bKElR 9Z4i25iCRrstZC5fkVtjw== X-UI-Out-Filterresults: notjunk:1;V01:K0:W3I9eDaaJQ8=:rx5TlhhexEWQRGgCpva//D CWWW5pL3+Y7qfOenxsF0QvlK8NpwLCN1my4DEtSiRoHXWDp1MBP+Vkm8ViwdDE0WSg3Kjz5TG 0Qwd1aA0mSKylU5GqZ+BXygsq1f2o0K8NAK3l/BDX67RTPzTemIIR+b9NMBAJLvsxnBYM/NGp eEfaEKg+cf7wLcaXxntd8qkKu+k/2w2VuiNx7kuTVwp6ussOQWPQqpYQiqXq9V0mOLXdModmZ 3Wg7zclcmsJZqddcQRpTNmB/cXFLZq4/IEFrWAX1ZnJIs5XFEuNWPZVI7n/wR3KT9YUebOec6 gslQFQqxsqq8/dkcd63pnFcFehmlgTXMOSYLqRrNDGT+ysQq/aHI9sM2SqZ0DsKkmF3dV7H91 m+sHzBn5OrievW0dzXlyh1TjFcYEd/Cw/5YfewdO4hdWkZAaPZTxEwRR/pB9Mf3BvCcJPerWn 6YMHlDQI1t/Ah9sxgcYQIZHMif8eJqpTa6II3PgYVjS9tT9xWCyGOmd+xUmGnJfmERf4QM8NL ubCJ2QOQ9CzMZ+nWJSJRbTKqaFEKmwTpGrdvwWBCrWBtNwjQX0MTcJ70A7kwwUDjNxed0vkP+ BDyMA4blwYbsOnIwYzYDq/GOZqFr3awiMFukUfLo9b+T6SL0BWorCHeClgR6IgrtbA/JOMiPU XYakGVPXQtyYgumUE6UDnvM5RyuMont4i+isUQXfgAc3CxHtLezh5SRjOxNcf6R/I8tBBSKXX YpkNoI8Y6enQtMl2B1fMYthFDRrGl6Nd1+kvfFOj5TL/+SCHSURuDc4yXJMiLOGdduah6ypRA tgAvSzBVfmiyJSeGl8aI1x6q8fEa5AC9KZMEV1ntr6rUeZ56GM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Steps to reproduce: * emacs -q * switch to a text-mode buffer * Run (insert-text-button "AAAAAAAAAAA" 'face 'font-lock-constant-face) * Run (font-lock-ensure) The button's face will now have changed from font-lock-constant to button. This only happens once, a second call to font-lock-ensure makes no such changes. Overlay buttons don't seem to be affected. I also tested this on a self-compiled emacs 25.2.1, with the same result. In GNU Emacs 26.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.19) of 2017-09-15 built on a-laptop Repository revision: 6e38b9253e3d67def0e16f90da574b4622d962a3 Windowing system distributor 'The X.Org Foundation From unknown Sun Jun 22 17:15:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28599: 26.0.50; font-lock-ensure changes the face of text buttons Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Oct 2019 18:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alexander Miller Cc: 28599@debbugs.gnu.org Received: via spool by 28599-submit@debbugs.gnu.org id=B28599.15724613058965 (code B ref 28599); Wed, 30 Oct 2019 18:49:02 +0000 Received: (at 28599) by debbugs.gnu.org; 30 Oct 2019 18:48:25 +0000 Received: from localhost ([127.0.0.1]:51447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPt17-0002KW-9n for submit@debbugs.gnu.org; Wed, 30 Oct 2019 14:48:25 -0400 Received: from quimby.gnus.org ([80.91.231.51]:32798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPt15-0002KL-Lt for 28599@debbugs.gnu.org; Wed, 30 Oct 2019 14:48:24 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iPt11-00024F-GE; Wed, 30 Oct 2019 19:48:21 +0100 From: Lars Ingebrigtsen References: <89bbbfb8-efe5-edca-a571-ca73267cb498@web.de> Date: Wed, 30 Oct 2019 19:48:18 +0100 In-Reply-To: <89bbbfb8-efe5-edca-a571-ca73267cb498@web.de> (Alexander Miller's message of "Mon, 25 Sep 2017 21:47:53 +0200") Message-ID: <87a79iqdcd.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alexander Miller writes: > Steps to reproduce: > > * emacs -q > * switch to a text-mode buffer > * Run (insert-text-button "AAAAAAAAAAA" 'face 'font-lock-constant-face) > * Run (font-lock-ensure) > > The button's face will no [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alexander Miller writes: > Steps to reproduce: > > * emacs -q > * switch to a text-mode buffer > * Run (insert-text-button "AAAAAAAAAAA" 'face 'font-lock-constant-face) > * Run (font-lock-ensure) > > The button's face will now have changed from font-lock-constant to button. > This only happens once, a second call to font-lock-ensure makes no such > changes. > Overlay buttons don't seem to be affected. > > I also tested this on a self-compiled emacs 25.2.1, with the same result. I'm unable to reproduce this exactly -- when I try this in Emacs 27, the face property is just cleared, and no new face is applied. And it happens on all calls to font-lock-ensure. This happens because that function calls, font-lock-default-fontify-region, which calls font-lock-default-unfontify-region is called, and it just does (defun font-lock-default-unfontify-region (beg end) "Unfontify the text between BEG and END. This function is the default `font-lock-unfontify-region-function'." (remove-list-of-text-properties beg end (append font-lock-extra-managed-props (if font-lock-syntactic-keywords '(syntax-table face font-lock-multiline) '(face font-lock-multiline))))) So if you want to have both your own faces and use font-lock, too, you have to use font-lock-face instead of face, according to "Precalculated Fontification". So there doesn't seem to be a bug here. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 14:48:30 2019 Received: (at control) by debbugs.gnu.org; 30 Oct 2019 18:48:31 +0000 Received: from localhost ([127.0.0.1]:51450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPt1C-0002Ks-L9 for submit@debbugs.gnu.org; Wed, 30 Oct 2019 14:48:30 -0400 Received: from quimby.gnus.org ([80.91.231.51]:32812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPt1A-0002Kk-Pe for control@debbugs.gnu.org; Wed, 30 Oct 2019 14:48:29 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iPt17-00026c-VS for control@debbugs.gnu.org; Wed, 30 Oct 2019 19:48:28 +0100 Date: Wed, 30 Oct 2019 19:48:25 +0100 Message-Id: <878sp2qdc6.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #28599 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 28599 notabug close 28599 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 28599 notabug close 28599 quit