-
Notifications
You must be signed in to change notification settings - Fork 75
Description
Hi,
I am not sure whether this issue is restricted to poly-R and poly-markdown (more precisely, poly-gfm+r-mode), so I post it here.
Sorry for the possible mismatch.
Including escaping backslashes in strings in R blocks makes polymode font-locking break:

The error message related to jit-lock is the following:
(jit-lock--run-functions 150 157) [span 150 157 test_quoted_backslash.Rmd] -> (font-lock-default-fontify-region 150 157): Wrong type argument: integer-or-marker-p, nil
This error is related to polymode fontification engine and does not appear when polymode is not installed. Here's the same example in markdown-mode (gfm-mode) without polymode but with markdown-fontify-code-blocks-natively set to t:

As you can see, no font-locking problem here. Note that I set up a minimal environment to implement these tests, to control for/neutralize the possible effects of my config.
Relevant parts of the minimal environment used for testing:
- GNU Emacs 29.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0)
- natively compiled, but "ess" "poly-R" "polymode" "polynoweb" "poly-markdown" "poly-noweb" "eieio" excluded from native comp
- ess 20240516.811 (Melpa)
- poly-R 20230416.1454 (Melpa)
- markdown-mode 20240501.1057 (dependency)
- poly-markdown 20230202.1210 (dependency)
- polymode 20230317.1218 (dependency)