unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Amin Bandali <bandali@gnu.org>
Cc: 40642@debbugs.gnu.org
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	[thread overview]
Message-ID: <jwveesoiykb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <878siwj10w.fsf@gnu.org> (Amin Bandali's message of "Wed, 15 Apr 2020 10:07:11 -0400")

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	other threads:[~2020-04-15 15:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15 14:07 bug#40642: 27.0.90; htmlfontify's hfy-force-fontification misusing jit-lock-fontify-now Amin Bandali
2020-04-15 15:01 ` Stefan Monnier [this message]
2020-04-15 15:10   ` Amin Bandali
2020-04-15 16:18     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwveesoiykb.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=40642@debbugs.gnu.org \
    --cc=bandali@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).