[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Giving "text quotes" syntax in font-lock-syntax-table only
From: |
Stefan Monnier |
Subject: |
Re: Giving "text quotes" syntax in font-lock-syntax-table only |
Date: |
Thu, 04 Jun 2020 10:00:58 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> Could you test the patch below to see if it makes the old code
>> work correctly?
> Yes, the fontification doesn't get scrambled with this modification.
Thanks. I pushed it to `master`.
> If I understand correctly, fontification still can fail even with this
> fix, if `font-lock-syntax-table' is modified after font lock mode is
> enabled.
Yes, if `font-lock-syntax-table` is modified/set directly rather than
via the 4th element of `font-lock-defaults`.
> So I think it's preferable to advertise that `font-lock-syntax-table'
> should not modified directly, unless the modification is restricted
> within translation between ".", "w" and "_", once after font lock
> mode is enabled.
We should probably deprecate the use of `font-lock-syntax-table`, indeed.
Stefan