Hi Keita, Ikumi Keita <ik...@ikumi.que.jp> writes:
> It is impossible to toggle the behavior by C-u because C-c C-e > (`LaTeX-environment'), unlike C-c C-m (`TeX-insert-macro'), eats up > C-u for switching to `LaTeX-modify-environment'. I agree, inserting macros and environments behave differently :-( > (We read > ,---- > | ;; When called with a prefix (C-u), only ask for mandatory arguments, > | ;; i.e. all optional arguments are skipped. See `TeX-parse-arguments' for > | ;; details. Note that this behavior may be changed in favor of a more > | ;; flexible solution in the future, therefore we don't document it at the > | ;; moment. > `---- > in the defun of `TeX-insert-macro'. Maybe now is the "future" mentioned > there.) I think this is "future past" ;-) AUCTeX manual says this[1] User Option: TeX-insert-macro-default-style Specifies whether TeX-insert-macro will ask for all optional arguments. If set to the symbol show-optional-args, TeX-insert-macro asks for optional arguments of TeX marcos, unless the previous optional argument has been rejected. If set to show-all-optional-args, TeX-insert-macro asks for all optional arguments. mandatory-args-only, TeX-insert-macro asks only for mandatory arguments. When TeX-insert-macro is called with prefix argument (C-u), it’s the other way round. So the comment above doesn't apply anymore. > Does anyone come up with good ideas? Would it make sense to say: • C-u C-c C-e modifies the document • C-u C-u C-c C-e toggles the arguments query ? Best, Arash P.S.: I think we also have an issue with inserting environments when region is selected, I will try to make a recipe in another mail. Footnotes: [1] https://www.gnu.org/software/auctex/manual/auctex.html#index-TeX_002dinsert_002dmacro_002ddefault_002dstyle