Mosè Giordano <[email protected]> writes: > On Sat, Oct 27, 2018 at 5:03 PM Manuel Wiesinger <[email protected]> wrote: >> >> Hi all, >> >> When I set TeX-insert-macro-default-style to mandatory-args-only, >> C-<RET> still asks me for optional arguments. >> >> E.g. when entering \textcolor, AUCTeX asks for the optional color model >> argument and inserts \textcolor[some_model]{some_color}{some_text}. With >> TeX-insert-macro-default-style set to mandatory-args-only, I would >> expect that I'm only asked for the mandatory color and text arguments >> and that \textcolor{some_color}{some_text} is inserted. >> >> Other macros show similar behavior. >> >> I tried this with Emacs 26.1, on two machines and with a minimal config, >> just loading AUCTeX. >> Is this a bug, or I missing something? > > `\textcolor' and similar macros use `TeX-arg-color' to insert the > color and indeed this function doesn't respect > `TeX-insert-macro-default-style', but this may be considered a feature > rather than a bug because the color specification in the mandatory > argument strongly depends on the model. The style file was created by > Arash, maybe he can give us a comment about this.
Hi Manuel and Mosè, IIRC, your assumption is right here and I didn't add any code to respect `TeX-insert-macro-default-style' since the optional argument is important for mandatory ones. But then again, I think Manuel is right here and the code should respect `TeX-insert-macro-default-style'. I'm not sure if I can give it a roll in near future, but I will add it to my todo list. Best, Arash _______________________________________________ auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex
