Re: Warning: reference to free variable `begin'

David Kastrup <[email protected]> Fri, 18 Mar 2005 17:53:27 +0100
Newsgroups gmane.emacs.auc-tex
Message-ID <[email protected]>
Ralf Angeli <[email protected]> writes:

> Guess what, one of my favorite problems back from AUCTeX 11.54 made
> its way to preview-latex.  Upon opening a LaTeX file a *Compile-Log*
> buffer pops up and says
>
> Warning: reference to free variable `begin'
>
> The byte compiler obviously ignores the boundp check in the advice for
> `TeX-region-create' in preview.el and barfs.

Sigh.

Anybody have a better idea than (symbol-value 'begin)?

Or a better way to get at the desired information in the first place?
Peeking at the "begin" variable in an enclosing function is really
dirty.

We should rip out the advice anyway (or only use it conditionally with
older, non-bundled AUCTeX) and fix AUCTeX and/or provide proper hooks.

I have not seen this problem here, Ralf.  Does it vanish for you if
you remove the "preactivated" bit?  Maybe then the advice does not get
compiled.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum