GNU bug report logs -
#28599
26.0.50; font-lock-ensure changes the face of text buttons
Previous Next
Reported by: Alexander Miller <alexanderm <at> web.de>
Date: Mon, 25 Sep 2017 19:49:01 UTC
Severity: normal
Tags: notabug
Found in version 26.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28599 in the body.
You can then email your comments to 28599 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28599
; Package
emacs
.
(Mon, 25 Sep 2017 19:49:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alexander Miller <alexanderm <at> web.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 25 Sep 2017 19:49:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28599
; Package
emacs
.
(Wed, 30 Oct 2019 18:49:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 28599 <at> debbugs.gnu.org (full text, mbox):
Alexander Miller <alexanderm <at> web.de> 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
Added tag(s) notabug.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 30 Oct 2019 18:49:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
28599 <at> debbugs.gnu.org and Alexander Miller <alexanderm <at> web.de>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 30 Oct 2019 18:49:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 28 Nov 2019 12:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 208 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.