[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 19:00:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 |
David Kastrup <address@hidden> writes:
> Arash Esbati <address@hidden> writes:
>
>> 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
>
> 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.
Thanks for your suggestion. Pushed patch to master.
Best, Arash