Hi Keita,

Ikumi Keita <[email protected]> writes:

> It seems that this recent commit is responsible:
> ,----
> | e4ceb88bb7cb4f406874de196aa71118449fe373
> | Author:     Arash Esbati <[email protected]>
> | AuthorDate: Tue Nov 22 21:10:32 2022 +0100
> | Commit:     Arash Esbati <[email protected]>
> | CommitDate: Tue Nov 22 21:10:32 2022 +0100
> | 
> | Bind a value to `LaTeX-current-environment' locally
> `----
>
> When I change `LaTeX-env-args' to
> (defun LaTeX-env-args (environment &rest args)
>   "Insert ENVIRONMENT and arguments defined by ARGS."
> ;  (let ((LaTeX-current-environment environment))
>     (LaTeX-insert-environment environment)
>     (LaTeX--env-parse-args args));)
> , indentation gets back to correct behavior.

Thanks for reminding me.  I checked latex.el before that change and that
variable is used in `LaTeX-indent-calculate', I should have known better
:-[

I wonder if this change is sufficient to fix the issue and doesn't have
other side effects:

  (defun LaTeX-env-args (environment &rest args)
    "Insert ENVIRONMENT and arguments defined by ARGS."
    (let ((LaTeX-current-environment environment)
          (LaTeX-indent-environment-check nil)) ; <-- ADDED
      (LaTeX-insert-environment environment)
      (LaTeX--env-parse-args args)))

Best, Arash

Reply via email to