[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Use a comment fontlock for regions between "\iffalse" and "
From: |
Mandar Mitra |
Subject: |
Re: [AUCTeX] Use a comment fontlock for regions between "\iffalse" and "\fi" |
Date: |
Fri, 3 Nov 2017 16:24:53 +0530 |
Hong Xu wrote (Tue, Oct 31, 2017 at 02:39:49PM -0700):
> On 10/29/2017 11:22 AM, Mosè Giordano wrote:
> > Hi Hong,
> >
> > 2017-10-29 6:54 GMT+01:00 Hong Xu <address@hidden>:
> >> Hi all,
> >>
> >> A common trick that people use to comment out a region is using
> >> "\iffalse" and "\fi".
> >> How can I achieve this,
> >
> > Perhaps playing with `font-latex-syntactic-keywords-extra', see for
> > example the file style for comment package.
> >
> >> and do you think it's a good idea to include
> >> this feature in auctex?
> >
> > I think that currently AUCTeX knows nothing about conditionals in
> > general. I'm not sure it's worth starting from fontification of this
> > very particular case.
> >
>
> Are you still interested in this :)
Sorry for butting in. I have a macros.tex file where I collect all commonly
used \usepackages, \newcommands and so forth. Based on advice received via this
mailing list, I inserted the following at the beginning of the file:
---------------------------------------------------------------------------
% Following workaround required in order to get auctex to parse this file
% and update auto/macros.el properly.
\iffalse
\documentclass{article}
\begin{document}
\fi
---------------------------------------------------------------------------
There's a matching \iffalse \end{document} \fi at the end of the file.
I don't know if this workaround is still required, but I suspect it will no
longer work once AUCTeX starts interpreting conditionals, so I have selfish
motives for hoping a little that things will remain as they are.