Le 14/06/17 à 22h52, Ikumi Keita a écrit :

> Hi Denis,

Hi Ikumi,

>>>>>> Denis Bitouzé <[email protected]> writes:
>>> Have you set `TeX-insert-braces' to t?
>
>> Well, I don't think so: I couldn't find `TeX-insert-braces' neither in
>> `emacs-leuven':
>
>>   ┌────
>>   │ http://emacs-leuven.readthedocs.io/en/latest/
>>   └────
>
>> nor in my `.emacs'.
>
> The default value of `TeX-insert-braces' is t, so I suppose that the
> option has a value of t on your machine.

I see :)

>>> In this case, AUCTeX will insert a pair of empty braces.
>
>> Is `TeX-insert-braces' the only one which inserts a pair of empty
>> braces? Because, with my current configuration, even with a dummy
>> command:
>
>>   ┌────
>>   │ C-c RET foo RET
>>   └────
>
>> inserts \foo{}.
>
> That's the effect of `TeX-insert-braces' being t.  If you customize it
> to nil, the empty braces don't appear.

OK, thanks.

In fact, there are some LaTeX \⟨command⟩s which are known to be
argumentless and for which, IMHO, after:

  ┌────
  │ C-c RET ⟨command⟩ RET
  └────

AUCTeX should insert:

  ┌────
  │ \⟨command⟩
  └────

and not:

  ┌────
  │ \⟨command⟩{}
  └────

Examples of such commands are \pause (now fixed), \frontmatter,
\mainmatter, \backmatter, \bfseries, \itshape, \ttfamily, etc.

As examples of such commands for which AUCTeX behaves well (doesn't
insert empty braces) are the font sizes switches (\tiny, \large, etc.).

All the best.
-- 
Denis


_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to