[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LaTeX-current-environment in macrocode environment
From: |
Arash Esbati |
Subject: |
Re: LaTeX-current-environment in macrocode environment |
Date: |
Tue, 15 Mar 2022 15:34:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 |
Hi Keita,
Ikumi Keita <ikumi@ikumi.que.jp> writes:
>>>>>> Arash Esbati <arash@gnu.org> writes:
>> Our current implementation for `LaTeX-current-environment' doesn't
>> recognize the env ' foo3 ' -- note that spaces and other non-letter
>> characters are allowed in env names.
>
> Oh, I didn't know that...
I can't tell if this is a supported way for defining environments or
just a side effect of how environments are defined in LaTeX internally
with the \@newenv macro which has the following definition:
\long\def\@newenv#1#2#3#4{%
\@ifundefined{#1}%
{\expandafter\let\csname#1\expandafter\endcsname
\csname end#1\endcsname}%
\relax
\expandafter\new@command
\csname #1\endcsname#2{#3}%
\l@ngrel@x\expandafter\def\csname end#1\endcsname{#4}}
The \csname\endcsname construct allows characters other than letters.
>> Hence, my suggestion for the change looks like this:
>
> Then shouldn't we also modify "newenvironment" entries in
> `LaTeX-auto-regexp-list' accordingly?
Thanks for reminding me. We probably should do that.
Best, Arash