Tassilo Horn <tsdh <at> gnu.org> writes:
Hi Tassilo,
> "Arash Esbati" <Esbati <at> gmx.de> writes:
>
> Hi Arash,
>
> > emacs ist not happy and exits with:
> >
> > let: Wrong number of arguments: #[(optional key-val-alist) ...
> >
> > Any idea what is going wrong here? TIA.
>
> `TeX-arg-key-val' has two mandatory arguments and you've omitted the
> first. But that function inserts the arguments it prompts for (i.e., it
> doesn't return them as a string), so your code wouldn't work also for
> that reason.
>
> --8<---------------cut here---------------start------------->8---
> (defvar LaTeX-enumitem-key-val-options
> '(;;
> ("topsep")
> ("partopsep")
> ("label")
> ("label*")
> ("align" ("left" "right" "parleft")))
> "Key=value options for enumitem macros and environments.")
>
> (TeX-add-style-hook
> "enumitem"
> (lambda ()
> ;; New environments
> (LaTeX-add-environments
> '("itemize" LaTeX-env-args [TeX-arg-key-val
LaTeX-enumitem-key-val-options])
> '("enumerate" LaTeX-env-args [TeX-arg-key-val
LaTeX-enumitem-key-val-options])
> '("itemize*" LaTeX-env-args [TeX-arg-key-val
LaTeX-enumitem-key-val-options])
> '("enumerate*" LaTeX-env-args [TeX-arg-key-val
LaTeX-enumitem-key-val-options]))))
> --8<---------------cut here---------------end--------------->8---
Thanks for your response and clarification. With your code, I get the
following in my tex document:
\begin{itemize*}[align=left]
<cursor position>
\end{itemize*}
I want AUCTeX to insert the first `\item' as well. Any idea how I can
achieve this?
\begin{itemize*}[align=left]
\item <cursor position>
\end{itemize*}
Best, Arash
_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex