[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indenting the code written in square brackets as optional parameters
From: |
Arash Esbati |
Subject: |
Re: Indenting the code written in square brackets as optional parameters |
Date: |
Tue, 08 Mar 2022 15:05:02 +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:
>> Can we use the same trick we use for the fontification of $, i.e., put a
>> closing ] as a comment in the same line?
>
> That didn't work as expected. :-( It seems that indentation command is
> smart enough to ignore "]" in comments.
Dammit, smart code 😉
> That can be an option. I think there are 3 (or more?) candidates:
> 1. New minor mode.
> 2. New user option.
> 3. Leave it as is.
>
> What do others think?
When in doubt, 3. is always a good choice. But would it make sense to
have a user option and the actual code ignores that in math-mode and
only kicks in within regular text? With that, one could define 2 macros
like this:
\DeclareTextSymbol{\textbracketleft}{T1}{`\[}
\DeclareTextSymbol{\textbracketright}{T1}{`\]}
and use them for unbalanced brackets. WDYT?
Best, Arash
- Re: Indenting the code written in square brackets as optional parameters, (continued)
- Re: Indenting the code written in square brackets as optional parameters, Ikumi Keita, 2022/03/04
- Re: Indenting the code written in square brackets as optional parameters, Denis Bitouzé, 2022/03/04
- Re: Indenting the code written in square brackets as optional parameters, निरंजन, 2022/03/04
- Re: Indenting the code written in square brackets as optional parameters, Ikumi Keita, 2022/03/04
- Re: Indenting the code written in square brackets as optional parameters, निरंजन, 2022/03/05
- Re: Indenting the code written in square brackets as optional parameters, Ikumi Keita, 2022/03/06
- Re: Indenting the code written in square brackets as optional parameters,
Arash Esbati <=
- Re: Indenting the code written in square brackets as optional parameters, Ikumi Keita, 2022/03/08
- Re: Indenting the code written in square brackets as optional parameters, Arash Esbati, 2022/03/08
- Re: Indenting the code written in square brackets as optional parameters, Sašo Živanović, 2022/03/09
- Re: Indenting the code written in square brackets as optional parameters, निरंजन, 2022/03/09
- Re: Indenting the code written in square brackets as optional parameters, Sašo Živanović, 2022/03/09
- Re: Indenting the code written in square brackets as optional parameters, Arash Esbati, 2022/03/09
- Re: Indenting the code written in square brackets as optional parameters, Ikumi Keita, 2022/03/10
- Re: Indenting the code written in square brackets as optional parameters, Ikumi Keita, 2022/03/16
- Re: Indenting the code written in square brackets as optional parameters, Arash Esbati, 2022/03/16
- Re: Indenting the code written in square brackets as optional parameters, Ikumi Keita, 2022/03/16