all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Adam Funk <a24061@ducksburg.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Telling auctex to format a user-defined command as \item ?
Date: Sat, 20 Sep 2014 11:30:38 +0200	[thread overview]
Message-ID: <87fvfmzlj5.fsf@thinkpad-t440p.tsdh.org> (raw)
In-Reply-To: <a11uebxomb.ln2@news.ducksburg.com> (Adam Funk's message of "Fri,  19 Sep 2014 17:08:42 +0100")

Adam Funk <a24061@ducksburg.com> 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	other threads:[~2014-09-20  9:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-19 16:08 Telling auctex to format a user-defined command as \item ? Adam Funk
2014-09-20  9:30 ` Tassilo Horn [this message]
     [not found] ` <mailman.9255.1411205467.1147.help-gnu-emacs@gnu.org>
2014-09-20 20:03   ` Adam Funk
2014-09-21  8:13     ` Tassilo Horn
     [not found]     ` <mailman.9287.1411287238.1147.help-gnu-emacs@gnu.org>
2014-09-24 15:00       ` Adam Funk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fvfmzlj5.fsf@thinkpad-t440p.tsdh.org \
    --to=tsdh@gnu.org \
    --cc=a24061@ducksburg.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.