[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question: add-face-text-property for 'font-lock-face?
From: |
Qiantan Hong |
Subject: |
Re: Question: add-face-text-property for 'font-lock-face? |
Date: |
Sun, 29 Aug 2021 21:13:11 +0000 |
> You want font-lock-append-text-property, I think:
>
> (font-lock-append-text-property START END PROP VALUE &optional OBJECT)
I think rather than hardcode a C function for another property, we could just
expose the general function the C implementation now is internally using
(add-text-property-1 START END PROP OBJECT MODE DESTRUCTIVE)
However, sorry for my own confusion, I found out this actually doesn’t solve my
problem.
Recall the problem:
> Users of crdt.el report that crdt-visualize-author-mode (which use
> font-lock-face to color code author of texts)
> conflict with faces from other modes. Apparently there are more than 1 mode
> which sets this text property.
In fact in most cases those other mode doesn’t set the ‘font-lock-face property,
the problem is ‘font-lock-face property (aka recalculated fontification) I set
overrides other font lock mechanism.
Is there a right way to add attributes while preserving font lock faces from
other mode?
I now see that Yuan’s suggestion of overlay will do this, but there’s
performance concern.
Re: Question: add-face-text-property for 'font-lock-face?, Eli Zaretskii, 2021/08/29
- Re: Question: add-face-text-property for 'font-lock-face?, Qiantan Hong, 2021/08/29
- Re: Question: add-face-text-property for 'font-lock-face?, Eli Zaretskii, 2021/08/29
- Re: Question: add-face-text-property for 'font-lock-face?, Clément Pit-Claudel, 2021/08/29
- Re: Question: add-face-text-property for 'font-lock-face?,
Qiantan Hong <=
- Re: Question: add-face-text-property for 'font-lock-face?, Stefan Monnier, 2021/08/29
- Re: Question: add-face-text-property for 'font-lock-face?, Qiantan Hong, 2021/08/29
- Re: Question: add-face-text-property for 'font-lock-face?, Ihor Radchenko, 2021/08/30
Re: Question: add-face-text-property for 'font-lock-face?, Clément Pit-Claudel, 2021/08/29