On an unrelated note, I did encounter another issue with this change:
it sporadically breaks some of the folding carried out by my package
https://github.com/ultronozm/czm-tex-mint.el, due to a weird bug that
I'm having trouble diagnosing.

The issue concerns detecting verbatim macros in code immediately after
moving out of an mmm-mode block in a LaTeX buffer.  Specifically, with
point at the beginning of the final line of such a block, evaluating

  (progn (forward-line) (TeX-verbatim-p))

returns non-nil, but should instead return nil.  For instance, if we
interactively do (forward-line) followed by (TeX-verbatim-p), then we
get nil.

As a result, (TeX-verbatim-p) returns t in cases where
(LaTeX-verbatim-macro-boundaries) doesn't return anything useful, and
so TeX-fold-macro-nth-arg fails to detect arguments.

The issue really boils down to

  (progn (forward-line) (syntax-propertize (point)) (nth 3 (syntax-ppss)))

The issue disappears when tested via edebug, which makes it a bit
tricky for me to debug further.  I've noticed that the issue does NOT
arise with

  (progn (forward-line) (mmm-update-submode-region) (syntax-propertize
(point)) (nth 3 (syntax-ppss)))

but DOES still arise when putting the same lines in my code (rather
than running it via M-:).

Any quick thoughts/suggestions?

Is there some function that "very forcefully" updates whatever
internals (syntax-propertize (point)) (nth 3 (syntax-ppss)) depend
upon?

Is one forced to resort to idle timer trickery?  That would be a bit
painful in the case I'm considering.



_______________________________________________
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to