Subject: Re: bug#74281: 30.0.91; font-lock mode hangs on scrolling large Scheme file

From: Eli Zaretskii <[email-masked]>
Date: Sun, 29 Dec 2024 20:58:31 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Sun, 29 Dec 2024 13:01:14 -0500
> 
> BTW, if we want something on `emacs-30`, we could go with a patch like
> the one below.
> 
> 
>         Stefan
> 
> 
> diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
> index a0f922f279c..c46422b7218 100644
> --- a/lisp/progmodes/scheme.el
> +++ b/lisp/progmodes/scheme.el
> @@ -201,7 +201,10 @@ scheme-mode-variables
>             scheme-font-lock-keywords-1 scheme-font-lock-keywords-2)
>            nil t (("+-*/.<>=!?$%_&~^:" . "w") (?#. "w 14"))
>            beginning-of-defun
> -          (font-lock-mark-block-function . mark-defun)))
> +          (font-lock-mark-block-function . mark-defun)
> +          ;; The (?#. "w 14") above causes font-lock to incorrectly
> +          ;; set `font-lock--syntax-table-affects-ppss' to t.
> +          (font-lock--syntax-table-affects-ppss . nil)))
>    (setq-local prettify-symbols-alist lisp-prettify-symbols-alist)
>    (setq-local lisp-doc-string-elt-property 'scheme-doc-string-elt))

What does it do, and what potential harm could happen if we install
this?