help-gnu-emacs
[Top][All Lists]
Advanced

[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 14:37:55 +0100 (CET)

Jan 26, 2022, 01:04 by monnier@iro.umontreal.ca:

> fatiparty@tutanota.com [2022-01-25 09:46:35] wrote:
>
>> Jan 25, 2022, 11:18 by help-gnu-emacs@gnu.org:
>>
>>>> Have looked for `font-lock-beginning-of-syntax-function' but
>>>> could not find information of possible obsolescence.
>>>>
>>> % grep font-lock-beginning-of-syntax-function etc/NEWS*
>>>  etc/NEWS.19:font-lock-beginning-of-syntax-function and 
>>> font-lock-keywords-case-fold-search.
>>>  etc/NEWS.25:Removed 'font-lock-beginning-of-syntax-function' and the 
>>> SYNTAX-BEGIN
>>>  %
>>>
>> 'syntax-begin-function' has also been declared obsolete.
>>

In `etc/NEWS.25' there is the comment 

** 'syntax-begin-function' is declared obsolete.

I guess that if one stops using  'syntax-begin-function', it would help remove
a dependency which would not be required in future.



> "Also" isn't quite right here: the above grep shows the other var has
> been *removed* which is different from being declared obsolete.
>
>> Would this mean that I can remove the following pieces
>>
>
> It means those pieces of code only have an effect for packages that
> still use that obsolete variable.  Whether you want to remove it or not
> is a choice I can't make for you.
>
>
>  Stefan
>
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?  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]