[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request: text property to prevent font-locking
From: |
Wolfgang Jenkner |
Subject: |
Re: feature request: text property to prevent font-locking |
Date: |
Sun, 31 Aug 2014 16:31:48 +0200 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (berkeley-unix) |
On Thu, Aug 28 2014, Drew Adams wrote:
> I want to apply some ad-hoc highlighting with text property `face'
> in a font-locked buffer (whether font-locking occurs before or after
> I apply `face' for this highlighting).
> I do not want font-lock to override this highlighting. I do not want
> to use `font-lock-keywords' (e.g. with KEEP) in order to create this
> highlighting. I just want to prevent font-lock from overriding it.
So, let me try to understand the extent of the problem.
font-lock-default-unfontify-region leaves alone any "alternative"
(defined in char-property-alias-alist) of the `face' text property.
In particular, this is how the font-lock-face text property works.
Now, on the one hand, keyword fontification does not override
"alternatives" (except if the highlight pattern has an `override' flag).
This is because text-property-not-all recognizes them and thus prevents
font-lock-apply-highlight from adding a value for the `face' property.
On the other hand, some experimenting suggests that syntactic
fontification does override those "alternatives".
> I want to apply some other text property to the highlighted text,
> to tell font-lock not to fiddle with it ("hands off this text").
Remove it from the value of `font-lock-extra-managed-props'.
tl; dr: Existing facilities reduce the problem to clashes with syntactic
fontification.
Wolfgang
- RE: feature request: text property to prevent font-locking, (continued)
- Re: feature request: text property to prevent font-locking, Stefan Monnier, 2014/08/31
- RE: feature request: text property to prevent font-locking, Drew Adams, 2014/08/31
- Re: feature request: text property to prevent font-locking, Stefan Monnier, 2014/08/31
- RE: feature request: text property to prevent font-locking, Drew Adams, 2014/08/31
- Re: feature request: text property to prevent font-locking, Alan Mackenzie, 2014/08/31
- Re: feature request: text property to prevent font-locking, Stephen J. Turnbull, 2014/08/31
Re: feature request: text property to prevent font-locking,
Wolfgang Jenkner <=