Re: Warning: reference to free variable `begin'
David Kastrup <[email protected]> Fri, 18 Mar 2005 19:36:53 +0100
| Newsgroups | gmane.emacs.auc-tex |
|---|---|
| Message-ID | <[email protected]> |
Ralf Angeli <[email protected]> writes: > * Ralf Angeli (2005-03-18) writes: > >> * David Kastrup (2005-03-18) writes: >> >>> Me neither. Outside of advice, I think this might be supposed to >>> work. Not too sure about that, though. >> >> No, it won't. Try `M-x compile-defun RET' on the following function: >> >> (defun foo () >> (and (boundp 'begin) begin)) >> >> However, it will work if you replace `and' by `if'. > > Uh, did I mention that besides (symbol-value 'begin) there is > another alternative for solving this problem? If you mean `if', then I seem to remember that the respective byte compiler intelligence was discussed/introduced rather recently. I am not inclined betting my peace on this working in every Emacs and XEmacs version. In contrast, symbol-value seems to be a somewhat safer bet. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum