auctex-devel
[Top][All Lists]
Advanced

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

Re: Wrong indentation of align* env with empheq.el


From: Arash Esbati
Subject: Re: Wrong indentation of align* env with empheq.el
Date: Mon, 28 Nov 2022 16:16:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Hi Keita,

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

> It seems that this recent commit is responsible:
> ,----
> | e4ceb88bb7cb4f406874de196aa71118449fe373
> | Author:     Arash Esbati <arash@gnu.org>
> | AuthorDate: Tue Nov 22 21:10:32 2022 +0100
> | Commit:     Arash Esbati <arash@gnu.org>
> | 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

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