Uwe Siart <[email protected]> writes:

Hi Uwe,

> TeX-insert-macro in math mode does not behave like I would expect. But
> I can't tell if it is a bug or not:
>
> In text mode when I mark a letter (say "A") as region and type "C-c RET
> macro" I get \macro{A} with braces around A.
>
> The same in math mode gives me \macroA (no braces).
>
> Is this intended? It does not make much sense to me since \macroA
> certainly won't work.

This happens only with macros where AUCTeX thinks they can't have any
arguments and macros that are unknown to AUCTeX.  For example, when you
use the amsmath package that provides a \text macro with one argument,

  $$ foo $$

with marked foo will become

  $$ \text{foo} $$

But you are probably right that this is a strange behavior for unknown
arguments and an active region.  I've changed that now: when there's an
active region, you'll get the {...} also in math modes.

Bye,
Tassilo


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

Reply via email to