From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Telling auctex to format a user-defined command as \item ? Date: Sat, 20 Sep 2014 11:30:38 +0200 Message-ID: <87fvfmzlj5.fsf@thinkpad-t440p.tsdh.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411205482 5860 80.91.229.3 (20 Sep 2014 09:31:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Sep 2014 09:31:22 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Adam Funk Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 20 11:31:16 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XVH0d-0006cb-QQ for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Sep 2014 11:31:15 +0200 Original-Received: from localhost ([::1]:33968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVH0d-0004Gw-EB for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Sep 2014 05:31:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVH0M-0004F0-Bq for help-gnu-emacs@gnu.org; Sat, 20 Sep 2014 05:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVH0D-00020t-Mh for help-gnu-emacs@gnu.org; Sat, 20 Sep 2014 05:30:58 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:55854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVH0D-00020S-J8 for help-gnu-emacs@gnu.org; Sat, 20 Sep 2014 05:30:49 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by gateway2.nyi.internal (Postfix) with ESMTP id D885D203C1 for ; Sat, 20 Sep 2014 05:30:43 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Sat, 20 Sep 2014 05:30:43 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:references:date :in-reply-to:message-id:mime-version:content-type; s=smtpout; bh=w4ykJ2vQnGIEuvJp5ABenofGKJc=; b=ILH25j3tXZEERh959MB/U92jgzuI mlaguTdDaa68uaEMXck0QD1WWWVcq/WzCVI8vNqsm1rEm+mrTZzqxmokmYp32LYQ EyTlBttng0JSTdyfd9xOKuvLIhb7pRhrKSzuDU3BSKpHe0q+X2ePx9Ief9QlppN4 A01i1SWsrQjvTus= X-Sasl-enc: YxfLMdnuKOjnuqxJlm1qls6181qx48Qil3433vMz1+ev 1411205443 Original-Received: from thinkpad-t440p.tsdh.org (unknown [2.160.72.49]) by mail.messagingengine.com (Postfix) with ESMTPA id E50206800DF; Sat, 20 Sep 2014 05:30:42 -0400 (EDT) In-Reply-To: (Adam Funk's message of "Fri, 19 Sep 2014 17:08:42 +0100") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.27 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100064 Archived-At: Adam Funk 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