Arash Esbati <[email protected]> writes:

> Mosè Giordano <[email protected]> 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

I would not couple the tests in that manner.  Just do

\ifx\commondummies\undefined \else
   [Fix \commondummies]
\fi
\ifx\definedummies\undefined \else
   [Fix \definedummies]
\fi

It keeps the tests connected to the actual code and has fewer implied
assumptions.

-- 
David Kastrup

_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to