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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40409: 27.0.90; void variable n-reb


From: Noam Postavsky
Subject: bug#40409: 27.0.90; void variable n-reb
Date: Sat, 04 Apr 2020 12:52:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (gnu/linux)

tags 40409 + patch
quit

Serghei Iakovlev <egrep@protonmail.ch> writes:

> Hello,
>
> This is reproducible using 'emacs -Q':
>
> - Open Emacs
> - M-x re-builder RED
> - Take a look at *Messages* buffer:
>
>   Error running timer ‘jit-lock--debug-fontify’: (void-variable n-reb)

The code causing this was added by [1: c1234ca9c3] (from Bug#6347), so
it's a regression since 26.3.

The problem seems to be that the initial binding of n-reb is missing,
and also that the code assumes dynamic binding (using symbol-value and
set on n-reb).  I would suggest the following patch:

Attachment: 0001-Fix-void-variable-n-reb-in-re-builder-Bug-40409.patch
Description: patch

If that is too big for emacs-27, the absolute mimimum fix would be:

modified   lisp/emacs-lisp/re-builder.el
@@ -779,7 +779,9 @@ reb-mark-non-matching-parenthesis
   ;; We have a small string, check the whole of it, but wait until
   ;; everything else is fontified.
   (when (>= bound (point-max))
-    (let (left-pars
+    (defvar n-reb)
+    (let ((n-reb 0)
+          left-pars
           faces-here)
       (goto-char (point-min))
       (while (and (reb-while 100 'n-reb "mark-par")

[1: c1234ca9c3]: 2019-06-27 19:08:42 +0200
  Add more fontification to regexp builder mode
  
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c1234ca9c3703cd8bae3912f3e0a1948bae3aed1

reply via email to

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