[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rainbow-delimiters-mode, syntax-begin-function and font-lock-beginning-o
From: |
fatiparty |
Subject: |
rainbow-delimiters-mode, syntax-begin-function and font-lock-beginning-of-syntax-function |
Date: |
Tue, 25 Jan 2022 16:05:03 +0100 (CET) |
Jan 26, 2022, 01:55 by monnier@iro.umontreal.ca:
>> Right, if the version of emacs has `syntax-begin-function', then one could
>> use that,
>> as has been done. I am making a new version without calls to things that
>> would,
>> be obsolete, but without breaking the colouring functionality.
>>
>> There is a call to flush the cache `(syntax-ppss-flush-cache 0' with
>> `(boundp 'syntax-begin-function)'. Would this still be necessary?
>>
>
> I recommend you read a bit more to understand a bit what these things do
> (e.g. what does it mean for `syntax-begin-function` to be nil) because
> changing code which you don't understand at all is just not fun.
>
> Stefan
>
If I completely remove the section (in Emacs 27.2):
(when (or (bound-and-true-p syntax-begin-function)
(bound-and-true-p font-lock-beginning-of-syntax-function))
(syntax-ppss-flush-cache 0))
(when (boundp 'syntax-begin-function)
(set (make-local-variable 'syntax-begin-function) nil))
(when (boundp 'font-lock-beginning-of-syntax-function)
(set (make-local-variable 'font-lock-beginning-of-syntax-function) nil))
I don't see any obvious adverse effects.
What was syntax-begin-function obsoleted in favour of?
- rainbow-delimiters-mode and syntax-begin-function, fatiparty, 2022/01/23
- Message not available
- rainbow-delimiters-mode, syntax-begin-function and font-lock-beginning-of-syntax-function, fatiparty, 2022/01/24
- Re: rainbow-delimiters-mode, syntax-begin-function and font-lock-beginning-of-syntax-function, Stefan Monnier, 2022/01/24
- rainbow-delimiters-mode, syntax-begin-function and font-lock-beginning-of-syntax-function, fatiparty, 2022/01/25
- Re: rainbow-delimiters-mode, syntax-begin-function and font-lock-beginning-of-syntax-function, Stefan Monnier, 2022/01/25
- rainbow-delimiters-mode, syntax-begin-function and font-lock-beginning-of-syntax-function, fatiparty, 2022/01/25
- Re: rainbow-delimiters-mode, syntax-begin-function and font-lock-beginning-of-syntax-function, Stefan Monnier, 2022/01/25
- rainbow-delimiters-mode, syntax-begin-function and font-lock-beginning-of-syntax-function,
fatiparty <=
- rainbow-delimiters-mode, syntax-begin-function and font-lock-beginning-of-syntax-function, fatiparty, 2022/01/25