[Top][All Lists]

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

[AUCTeX] Parsing of \newcommand should detect when macro takes no argume

From: Frank Küster
Subject: [AUCTeX] Parsing of \newcommand should detect when macro takes no argument
Date: Thu, 30 Jun 2005 16:02:59 +0200
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

In my document preamble, I have a couple of abbreviation macros, e.g. 

\newcommand{\dtmax}{\ensuremath{\Delta t_\mathrm{max}}}

Due to AUCTeX's fabulous parsing ability, I can enter these macros with
C-c RET etc.  However, after that I always get \proxx{} with point
inside the braces, which doesn't make sense.  On the other hand, the
syntax for \newcommand is clear - possible arguments are indicated by
its optional argument, and a situation like


should be fairly rare in actual LaTeX documents, although it might
occur more often in style files.  

I suggest to put point right after the closing brace for such macros; I
prefer to add one (or a couple of) pairs of braces in the rare cases when
they are needed, instead of having to move point all the time.

Alternatively, this could be made customizable - in this case, the
customization could perhaps only be activated when interactively editing
a buffer (as opposed to running commands like TeX-auto-generate in batch

Thanks for considering,

Emacs  : GNU Emacs 21.4.1 (i386-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2005-03-17 on trouble, modified by Debian
Package: AUCTeX 11.55

current state:
 window-system 'x
 LaTeX-version "2e"
 TeX-style-path '("style/" "auto/" "/home/frank/texmf/tex/latex/style/" 
"/var/lib/auctex/emacs21/" "/home/frank/.auctex-styles/"
                  "/home/frank/.auctex-styles/" "/home/frank/.auctex-styles/" 
                  "/home/frank/.auctex-styles/" "/home/frank/.auctex-styles/" 
                  "/home/frank/.auctex-styles/" "/home/frank/.auctex-styles/")
 TeX-auto-save t
 TeX-parse-self t
 TeX-master "Laborbuch"
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer

reply via email to

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