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

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

bug#40642: 27.0.90; htmlfontify's hfy-force-fontification misusing jit-l


From: Stefan Monnier
Subject: bug#40642: 27.0.90; htmlfontify's hfy-force-fontification misusing jit-lock-fontify-now
Date: Wed, 15 Apr 2020 11:01:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Amin,

> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   jit-lock--run-functions(1 10813)
>   jit-lock-fontify-now()
>   hfy-force-fontification()
>   htmlfontify-buffer()
>   scpaste("index")
>   scpaste-index()
>   funcall-interactively(scpaste-index)
>   call-interactively(scpaste-index record nil)
>   command-execute(scpaste-index record)
>   counsel-M-x-action("scpaste-index")

Does the simple patch below fix your problem?


        Stefan


diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index c0012427ae..08e52d63a2 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -1837,7 +1837,8 @@ hfy-force-fontification
       (when font-lock-defaults
         ; Silence "interactive use only" warning on Emacs >= 25.1.
         (with-no-warnings (font-lock-fontify-buffer)))))
-   ((fboundp #'jit-lock-fontify-now)
+   ((and (fboundp #'jit-lock-fontify-now)
+         (bound-and-true-p jit-lock-mode))
     (message "hfy jit-lock mode (%S %S)" window-system major-mode)
     (jit-lock-fontify-now))
    (t






reply via email to

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