auctex-devel
[Top][All Lists]
Advanced

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

Re: master 04b9a6d1: Improve shortvrb.sty support


From: Arash Esbati
Subject: Re: master 04b9a6d1: Improve shortvrb.sty support
Date: Thu, 27 Apr 2023 09:32:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Keita,

Ikumi Keita <ikumi@ikumi.que.jp> writes:

> It turned out that the following piece of code in font-latex-test.el is
> the culprit:
> (define-advice LaTeX-common-initialization (:after ())
>   (font-lock-ensure))
>
> Due to this advice, syntax propertization runs before
> `font-latex-syntactic-keywords-extra' is ready, so emacs thinks that
> "Syntax propertization is already done." and doesn't apply the updated
> contents of `font-latex-syntactic-keywords-extra'.

Thanks for looking at this.

> We can circumvent this situation by inserting
>       (syntax-ppss-flush-cache (point-min))
> between
>       (TeX-update-style t)
> and
>       (font-lock-ensure)
> in `font-latex-shortvrb-chars' in font-latex-test.el.

I played with `font-lock-flush' but `syntax-ppss-flush-cache' is the
correct one.

> (In a longer term perspective, we should factor out the syntax
> propertization facility out of font-latex.el and implement it as a major
> mode functionality in order to avoid these gotchas due to involvement of
> syntax propertization and font lock.)

IIRC this issue has popped up before, right?

> By the way, I think these syntax table codes in shortvrb.el are no
> longer necessary, aren't they?
>    ;; Syntax
>    (when LaTeX-shortvrb-chars
>      (let ((st (make-syntax-table (syntax-table))))
>        (dolist (c LaTeX-shortvrb-chars)
>          (modify-syntax-entry c "\"" st))
>        (set-syntax-table st)))

Yes, I removed that bit.  The current change is attached.  I will
install it in a day or two if there is no other comment.  Again, thanks
for your help.

Best, Arash

Attachment: shortvrb.patch
Description: Text Data


reply via email to

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