Subject: bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

From: Arash Esbati <[email-masked]>
Date: Fri, 06 Jan 2017 12:43:37 +0100

Tassilo Horn <[email-masked]> writes:

> I know what I did wrong. Will fix when I'm back home.

Hi Tassilo,

thanks a ton for doing this.  I think there is an issue with the code
since I'm getting the following in *Message* buffer:

    Error during redisplay: (jit-lock-function 1) signaled (void-function copy-list)

Recipe for invoking:

    \documentclass{article}

    %% eval first:
    %% (jit-lock-debug-mode 1)
    %% (setq debug-on-error t)

    \begin{document}
    Put point inside math $$ and press `_'
    \end{document}

Results in:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (void-function copy-list)
  copy-list((raise -0.5))
  font-latex--get-script-props(136 :sub)
  font-latex-script(136)
  eval((font-latex-script (match-beginning 0)))
  font-lock-fontify-keywords-region(113 153 nil)
  font-lock-default-fontify-region(113 153 nil)
  font-latex-fontify-region(113 153 nil)
  font-lock-fontify-region(113 153)
  #[257 "\211\300\301\"\211\242\306=\203
  run-hook-wrapped(#[257 "\211\300\301\"\211\242\306=\203
  jit-lock--run-functions(113 153)
  jit-lock-fontify-now(113 153)
  jit-lock--debug-fontify()
  apply(jit-lock--debug-fontify nil)
  timer-event-handler([t 0 0 0 t jit-lock--debug-fontify nil idle 0])
--8<---------------cut here---------------end--------------->8---

Can others reproduce this?

Best, Arash