auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] Insertion of braces when the last argument of a macro


From: Tassilo Horn
Subject: Re: [AUCTeX-devel] Insertion of braces when the last argument of a macro is optional
Date: Thu, 26 Sep 2013 16:14:15 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Mosè Giordano <address@hidden> writes:

Hi Mosè,

> in *TeX empty groups aren't harmless and I think AUCTeX shouldn't
> append braces to a macro when its last argument is optional.

I'm not sure.  I think that depends on how the macro is question has
been defined, and AUCTeX cannot find out.  For example, take this macro
with just one optional argument:

  \newcommand{\jimgoes}[1][surfing]{Jim goes #1}

Then these all look good:

  \jimgoes[fishing] and then drinks a beer.
  \jimgoes[fishing]{} and then drinks a beer.
  \jimgoes{} and then drinks a beer.

But here you get "surfingand" cause the macro eats the next whitespace:

  \jimgoes and then drings a beer.

Bye,
Tassilo




reply via email to

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