[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indenting the code written in square brackets as optional parameters
From: |
Ikumi Keita |
Subject: |
Re: Indenting the code written in square brackets as optional parameters |
Date: |
Wed, 16 Mar 2022 17:59:04 +0900 |
Hi all,
>>>>> Ikumi Keita <ikumi@ikumi.que.jp> writes:
>>>>> Sašo Živanović <saso.zivanovic@guest.arnes.si> writes:
>> Summing up: while I find []-indenting indispensable for Forest trees,
>> and TikZ in general, I would definitely want to have an way to
>> override it for specific cases, and counting stuff in comments seems
>> the simplest way to implement the override.
>> On the other hand, I have a hard time imagining a situation where I
>> would want to override a {}-based indent via a comment, so I would say
>> that the AuCTeX's current behaviour to ignore these in comments makes
>> perfect sense and should be kept (even without the historical
>> reasons). So I would propose that the extended indenting mechanism
>> would ignore {} in comments but count all other delimiters.
> That seems reasonable direction: In comments, ignore {} while count []
> (and other symbols?).
> And it seems that AUCTeX should consider to indent inside [] only
> optionally; by default it should indent inside {} only.
I think the attached patch works as expected. My approach is to include
only additional delimiters in new user options, since braces "{" and "}"
should always be considered to pull in indentation.
To try indent inside square brackets, include
(setq TeX-indent-open-delimiters "[")
(setq TeX-indent-close-delimiters "]")
somewhere in your init.el.
If this proposal is acceptable, I can commit it the git repo and I'd
appreciate if someone could write suitable paragraphs to include in
.texi documentation ;-) .
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
0001-Enable-indent-by-square-bracket.patch
Description: tentative patch
- Re: Indenting the code written in square brackets as optional parameters, (continued)
- 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, 2022/03/08
- 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 <=
- 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
- Re: Indenting the code written in square brackets as optional parameters, निरंजन, 2022/03/16
- Re: Indenting the code written in square brackets as optional parameters, Sašo Živanović, 2022/03/16
- Re: Indenting the code written in square brackets as optional parameters, Arash Esbati, 2022/03/18
- Re: Indenting the code written in square brackets as optional parameters, Ikumi Keita, 2022/03/19
- Re: Indenting the code written in square brackets as optional parameters, Arash Esbati, 2022/03/19
- Re: Indenting the code written in square brackets as optional parameters, Ikumi Keita, 2022/03/20