Hi Derek and Paul,

> If I don't turn on font locking when I use AUCTeX, I'm getting
> annoying messages almost every keystroke:

>   Error during redisplay: (internal--syntax-propertize 7526) signaled (error 
> "Font-lock trying to use keywords before setting them up”)

Thanks for your report. I admit AUCTeX isn't good at this point. It
depends on font lock facility to perform syntax propertizing. :-(

>>>>> Paul Nelson <ultr...@gmail.com> writes:
> Another workaround might be M-: (font-lock-set-defaults).

It seems it does work while font lock itself is still disabled. I
speculate that the current syntax propertize function only needs that
font lock variables are set up. Then I hope the patch below does the
trick.

Derek, can you try it?

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW

diff --git a/font-latex.el b/font-latex.el
index ccddd8b1..7a02e3f4 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1313,7 +1313,10 @@ triggers Font Lock to recognize the change."
   (let ((kws ;; (if (derived-mode-p 'docTeX-mode)
              ;;     font-latex-doctex-syntactic-keywords
                font-latex-syntactic-keywords)) ;; )
-    (syntax-propertize-via-font-lock kws)))
+    (let ((func (syntax-propertize-via-font-lock kws)))
+      (lambda (start end)
+        (or font-lock-set-defaults (font-lock-set-defaults))
+        (funcall func start end)))))
 
 ;;;###autoload
 (defun font-latex-setup ()



_______________________________________________
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex
  • bug#71164: 14... Derek Clegg via bug-auctex via Bug reporting list for AUCTeX
    • bug#7116... Paul Nelson
      • bug#... Ikumi Keita
        • ... Arash Esbati
          • ... Arash Esbati
            • ... Arash Esbati
              • ... Paul Nelson
              • ... Derek Clegg via bug-auctex via Bug reporting list for AUCTeX
                • ... Ikumi Keita

Reply via email to