auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] A patch to fix auctex.texi


From: Arash Esbati
Subject: Re: [AUCTeX-devel] A patch to fix auctex.texi
Date: Wed, 29 Jun 2016 13:56:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95

Mosè Giordano <address@hidden> writes:

> Thank for the report.  I would use a conditional to test which command
> is defined, see for example http://www.tex.ac.uk/FAQ-isdef.html

I think this should do it:

diff --git a/doc/macros.texi b/doc/macros.texi
index fdf37a0..3f3a80f 100644
--- a/doc/macros.texi
+++ b/doc/macros.texi
@@ -64,10 +64,17 @@ font-latex
   \def\TeX#1{TeX#1}%
   \def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
 \xdef\indexnofonts{\the\toks0}
-\toks0\expandafter{\commondummies
-  \def\TeX#1{TeX#1}%
-  \def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
-\xdef\commondummies{\the\toks0}
+\ifx\commondummies\undefined
+  \toks0\expandafter{\definedummies
+    \def\TeX#1{TeX#1}%
+    \def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
+  \xdef\definedummies{\the\toks0}
+\else
+  \toks0\expandafter{\commondummies
+    \def\TeX#1{TeX#1}%
+    \def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
+  \xdef\commondummies{\the\toks0}
+\fi
 \ifx\acronym\undefined \gdef\acronym#1{{\smallcaps \lowercase{#1}}} \fi
 \ifx\env\undefined \global\let\env=\code \fi
 \ifx\option\undefined \global\let\option=\samp \fi

Best, Arash




reply via email to

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