Subject: Re: bug#58689: 13.1.4; LaTeX-modify-environment fails to modify a single line environment.

From: Ikumi Keita <[email-masked]>
Date: Mon, 24 Oct 2022 00:26:01 +0900

Hi Jean-Jacques,

>>>>> Jean-Jacques Rétorré <[email-masked]> writes:
> As a MWE

> ,----
> | \documentclass{article}
> | \begin{document}
> | \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}
> | \end{document}
> `----

> C-u C-c C-e RET bmatrix produce

> ,----
> | \documentclass{article}
> | \begin{bmatrix}
> | \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}
> | \end{document}
> `----

Thank you for the report. AUCTeX assumes that \begin and \end lie on
their own lines in general, hence the behavior.

Looking at the relevant code, I think I can do something for
LaTeX-modify-environment to cover the situation where \begin and \end
are on the same line. I expect that I can have spare time to manage this
issue on November.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine