Subject: Re: bug#48447: 27.2.50; Font-lock error in temporary bibtex-mode buffer

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 13 Jul 2022 14:37:21 +0200

Stefan Monnier <[email-masked]> writes:

> Hmm... this looks like a workaround rather than a fix of the core
> problem because I can't see any use of "font-lock internals" in
> bibtex.el which would justify such a need.
>
> I suspect that the problem is linked to
> `syntax-propertize-via-font-lock`, so I think the fix should go there.

Possibly.  The backtrace is

Debugger entered--Lisp error: (error "Font-lock trying to use keywords before setting th...")
  signal(error ("Font-lock trying to use keywords before setting th..."))
  error("Font-lock trying to use keywords before setting th...")
  font-lock-compile-keywords((("^[ \11]*\\(@\\)Comment\\>" 1 '(11))) t)
  font-lock-fontify-syntactic-keywords-region(1 86)
  #f(compiled-function (start end) #<bytecode 0xabaf7b9213c487b>)(1 86)
  syntax-propertize(86)
  internal--syntax-propertize(25)
  scan-sexps(24 1)
  forward-sexp(1)
  bibtex-parse-field-string()
  bibtex-parse-field-text()
  bibtex-parse-association(bibtex-parse-field-name bibtex-parse-field-text)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no