[Top][All Lists]

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

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

From: Ikumi Keita
Subject: Re: Wrong indentation of align* env with empheq.el
Date: Tue, 29 Nov 2022 14:53:07 +0900

Hi Arash,

>>>>> Arash Esbati <> writes:
> 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)))

It seems that it doesn't in the range I tried, but I don't agree with
that idea so much. In my opinion, let-binding of
`LaTeX-current-environment' should be restricted to rather low level
functions where it is absolutely evident that it doesn't have bad side
effects. Doing in general-purpose functions like `LaTeX-env-args' can
lead to a mysterious behavior which is hard to debug for future

If you still want to stay with that idea, how about moving the
let-binding into `LaTeX--env-parse-args'? Then we can avoid unintended
interaction of `LaTeX-current-environment' and
`LaTeX-insert-environment', and simplify `LaTeX-env-item-args' and
`LaTeX-env-label-args' at the same time.

Ikumi Keita
#StandWithUkraine #StopWarInUkraine

reply via email to

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