help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Telling auctex to format a user-defined command as \item ?


From: Tassilo Horn
Subject: Re: Telling auctex to format a user-defined command as \item ?
Date: Sat, 20 Sep 2014 11:30:38 +0200
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux)

Adam Funk <address@hidden> writes:

Hi Adam,

> I have the following definitions in the preamble:
>
> #v+
> \newcommand{\slug}{\hspace{1.0em}}
> \newcommand{\object}[1]{\textsf{#1}}
> \newcommand{\method}[3]{\item{\slug}\object{#1}{\slug}\url{#2}{\slug}#3}
> #v-
>
>
> So I have lists with this sort of thing:
>
> #v+
> \begin{itemize}
>   \method{GET}{http://localhost:port/documents}{lists all document ids.}
>   \method ...
> #v-
>
> The formatting commands (indent-region, fill-region, etc.) aren't
> keeping the \method commands on separate lines (like \item) because
> latex-mode/auctex doesn't know what they are.  What magic do I need to
> use to tell it to format \method like \item?

Does it help to adapt `LaTeX-item-regexp' so that it also recognizes
your \method macros at items?

Bye,
Tassilo



reply via email to

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